1、添加自定义字段:提交时间-->tijiaoshijian
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>
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>
本站部分文章搜集整理于互联网或者网友提供,如有侵权请联系站长
如若转载,请注明出处:https://htmlbk.com/dedecms/401.html
温馨提示:该文档最后一次修改时间为2020-01-25 11:55:40,请注意相关的内容是否还可用!