1 /*-------------------- 获取系统当前时间方法start------------------------ */ 2 3 function datetime() { 4 var now = new Date(); 5 $(‘#createDate‘).val(now.getFullYear() + "-" 6 + (now.getMonth() + 1) + "-" + now.getDate()+" "+now.getHours() + ":" 7 + now.getMinutes() + ":" + now.getSeconds()) 8 } 9 window.setInterval("datetime()"); 10 /*--------------------------- 获取系统当前时间方法end------------------------ */