标签:
Drupal = {}; Drupal.theme = function (func) { console.log(arguments); var args = Array.prototype.slice.apply(arguments,[‘1‘]); console.log(args); return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args); }; Drupal.theme.prototype = { placeholder: function (str) { return ‘<em class="placeholder">‘ + str + ‘</em>‘; } }; console.log(‘1111‘); var a = Drupal.theme(‘placeholder‘, ‘aaaa‘) console.log(a);
为什么placeholder可以做为参数传到Drupal.theme里面
难以理解
标签:
原文地址:http://www.cnblogs.com/qinqiu/p/5088434.html