gpt4 book ai didi

javascript - 为什么在 jQuery 函数中使用 'undefined' 作为第二个参数?

转载 作者:行者123 更新时间:2023-11-29 19:53:35 34 4
gpt4 key购买 nike

<分区>

我在 jQUery UI 源代码中看到了这个范围封装,未定义的值作为第二个参数 https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.button.js .当我写一个 jquery ui 插件时,我想知道在参数中设置 undefined 有什么好处?

(function( $, undefined ) {
//...
}( jQuery);

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com