/** * Created by chen on 2017/6/27. */ !function (w) { function a(w){ this.yaer=new Date().getFullYear(); this.json=[]; this.days=0; this.nowyear=0; } a.prototype={ constructor:a, init:function(){ this.createJSON(); }, createJSON:function(){ for(var i=0;i<10;i++){ this.nowyear=this.yaer+i; this.json[i]={ "name":this.nowyear, "sub":[] }; for(var j=0;j<12;j++){ this.json[i]['sub'][j]={ "name":(j+1), "sub":[] } this.days=this.getDay(this.nowyear,j+1); for(var n=0;n