max*_*mus 10 javascript jquery javascript-framework
我注意到在jQuery核心中,传入的两个参数之一是未定义的.
(function( window, undefined ) {
// Use the correct document accordingly with window argument (sandbox)
var document = window.document;
var jQuery = (function() {
// ...defintion of the rest of the core...
window.jQuery = window.$ = jQuery;
})(window);
Run Code Online (Sandbox Code Playgroud)
谁能解释为什么第二个参数未定义?
提前致谢!
Undefined 是一种类型,但也是一个全局变量。
您可以拥有一个通过执行以下操作来覆盖 undefined 值的模块undefined = whatever。
jQuery 使用立即函数来确定窗口和未定义的范围。
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/undefined
| 归档时间: |
|
| 查看次数: |
2503 次 |
| 最近记录: |