1.一个页面的所有js都可以写成这样,比如:
   var index ={};
   index.User = ****;
   index.Init = function(){ $("$test").bind("click",index.Test); ***** };
   index.GetStartTime = function { return ***;}
   index.GetEndTime = function(){ return ***;}
   index.Test = function(){ ****;}
   好处是:可以干净利落的将所有方法事件属性放在Index对象里,最后我们可以将Index对象提炼成为一个js文件。

相关文章:

  • 2019-03-22
  • 2022-01-25
  • 2021-08-30
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2021-10-10
  • 2021-10-10
  • 2022-12-23
相关资源
相似解决方案