var now=new Date();
//Year = day.getYear();//有火狐下2008年显示108的bug
var y=now.getFullYear();//注意兼容性,这种在ie和火狐都行
var m=now.getMonth()+1;
var d=now.getDate();
var newTime = "";
newTime += y + "";
if (m >= 10 ){
newTime += m + "";
} else{
newTime += "0" + m + "";
}
if (d >= 10 ){
newTime += d ;
}else{
newTime += "0" + d ;
}