(function(window, $, baseUrl) { $.fn.fun1= function(){} fun2= function(){} function fun3() {}// 这种写法js调不到 })(window, jQuery, baseUrl);
js调用
<script type="text/javascript">
$().fun1();
$.fun1();
fun2();
</script>
(function(window, $, baseUrl) { $.fn.fun1= function(){} fun2= function(){} function fun3() {}// 这种写法js调不到 })(window, jQuery, baseUrl);
js调用
<script type="text/javascript">
$().fun1();
$.fun1();
fun2();
</script>