");
htmls.push("
");
htmls.push("
");
htmls.push("
");
htmls.push("
");
htmls.push("");
for (var i = 0; i < myMonth[0].length; i++) htmls.push("" + myMonth[0][i] + " | ");
htmls.push("
");
var d, w;
for (w = 1; w < myMonth.length; w++) {
htmls.push("");
for (d = 0; d < 7; d++) {
htmls.push(""+(!isNaN(myMonth[w][d]) ? myMonth[w][d] : "")+" ");
for (var i = 0; i < signList.length; i++) {
if(myMonth[w][d]!=undefined && signList[i].date==myMonth[w][d])
htmls.push(" ");
}
htmls.push(" | ");
}
htmls.push("
");
}
htmls.push("
");
htmls.push("
");
return htmls.join('');
}
};
function getQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return "";
}
calUtil.init([{"date": ""}]);
function getdata() {
//默认初始化
var dqri = getQueryString("dqri");
if(dqri!=""){
calUtil.curYear = calUtil.showYear = dqri.split("-")[0];
calUtil.curMonth = calUtil.showMonth = dqri.split("-")[1];
calUtil.curDate = calUtil.showDate = dqri.split("-")[2];
calUtil.eventName = "current";
getJson(calUtil.showYear, calUtil.showMonth);
}else{
//使用服务器期时间戳,校正本地日历时间
var url = "/system/resource/newsdata/getData.jsp";
$.get(url, function (data, state, xhr) {
var datestr = xhr.getResponseHeader("Date");
var date = new Date(datestr);
if (datestr != null && date != undefined) {
calUtil.curYear = calUtil.showYear = date.getFullYear();
calUtil.curMonth = calUtil.showMonth = date.getMonth() + 1;
calUtil.curDate = calUtil.showDate = date.getDate();
}
getJson(calUtil.showYear, calUtil.showMonth);
}, "json")
}
}
getdata();