Jquery简单闭包

<html>

<body>

<script src="Js/Index.js"></script>

<script type="text/javascript">

        $(function () {

      index.init();

 })

    </script>

</body>

</html>

var index = (function () {
 //加载页面事件
    var _initPageEvent = function () {
}
  return {
        init: function () {
                _initPageEvent();
            }
        }
})();

猜你喜欢

转载自www.cnblogs.com/zhangchengye/p/11209045.html