js引入外部资源挂载到window上调用

在html页面的script中引入

window.holiday = [
    20200101,
    20200124,
    20200127,
    20200128,
    20200129,
    20200130,
    20200406,
    20200501,
    20200504,
    20200505,
    20200625,
    20200626,
    20201001,
    20201002,
    20201005,
    20201006,
    20201007,
    20201008
  ]
var DateUtil = {
  holiday: window.holiday,
  search:function(){
        
  }
}

 

你可能感兴趣的:(前端)