sha*_*mas 9 javascript global apply window-object
var shell = function (method) {
window[method].apply(null, Array.prototype.slice.call(arguments, 1));
};
shell('alert', 'monkey!');
Run Code Online (Sandbox Code Playgroud)
gbl*_*zex 10
alert.apply是问题所在.警报不是语言的一部分,因此它甚至可能不是一种功能.它取决于实现.
| 归档时间: |
|
| 查看次数: |
349 次 |
| 最近记录: |