日期:2014-05-16 浏览次数:20903 次
var time=new Date();
var localtime = new Array();
var hours = 0;
var minute = 0;
var second = 0;
localtime[0] = time.getFullYear();
localtime[1] = time.getMonth()+1;
localtime[2] = time.getDate();
function getstatus(gtime) {
var status = '';
var getarray = gtime.split("-");
var gettime = new Array(parseInt(getarray[0]), parseInt(getarray[1]), parseInt(getarray[2]));
for(var i=0;i<4;i++) {
if(gettime[i]>localtime[i]) {
status = '<font color="green">即将开始</font>';
break;
}
else
if(gettime[i]<localtime[i]){
status = '<font color="gray">已经开始</font>';
break;
}
else {
status = '<font color="red">正在进行</font>';
}
}
document.write(status);
}