日期:2014-05-16 浏览次数:20716 次
//设置时间
function SetDateTime() {
try {
document.getElementById('lblTime').innerHTML = (new Date()).format('yyyy年MM月dd日')
+ " " + CalendarStr.dayNames[(new Date()).getDay()]
+ " " + (new Date()).format('HH:mm:ss');
paramDataTime = (new Date()).format('yyyy年MM月dd日')
+ " " + CalendarStr.dayNames[(new Date()).getDay()];
}
catch (e) {
}
};
/** 獲取當前時間周数 **/
var CalendarStr = {
dayNames: function(day) {
switch (day) {
case 0:
return "星期天";
case 1:
return "星期一";
case 2:
return "星期二";
case 3:
return "星期三";
case 4:
return "星期四";
case 5:
return "星期五";
case 6:
return "星期六";
}
}
};
/** 獲取當前時間字符串 **/
function getFormatDate(oDate) {
var year = oDate.getFullYear();
var month = oDate.getMonth() + 1;
month = month < 10 ? "0" + month : month;
var date = oDate.getDate();
date = date < 10 ? "0" + date : date;
var hour = oDa