2、在模版<form></form>中添加如下代码即可
<input name="tijiaoshijian" value="" type="hidden" id="tijiaoshijian" />
<script type="text/javascript">
window.onload = function(){
var nowDate = new Date();
var str = nowDate.getFullYear()+"-"+(nowDate.getMonth() + 1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+":"+nowDate.getSeconds();
document.getElementById("tijiaoshijian").value=str;
}
</script> 本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!