function getDatestr(){
//visitTime
var now=new Date();
var year=now.getFullYear();
var month =now.getMonth()+1;
var day=now.getDate();
var hour=now.getHours();
var minute=now.getMinutes();
if(month<10){
month="0"+month;
}
if(day<10){
day="0"+day;
}
if(hour<10){
hour="0"+hour;
}
if(minute<10){
minute="0"+minute;
}
var nowdate=year+"-"+month+"-"+day+" "+hour+":"+minute;
$('#visitTime').val(nowdate);
}
阅读(1606) | 评论(0) | 转发(0) |