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文件。

相关文章:

  • 2022-01-25
  • 2021-08-30
  • 2022-01-29
  • 2021-12-25
  • 2021-08-23
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-02-05
  • 2021-05-23
  • 2022-12-23
相关资源
相似解决方案