织梦dedecms自定义表单显示提交时间的方法

时间:2016-07-10
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>
上一条:织梦dede:channelartlist调用排除指定typeid栏目数据的方法 下一条:dedecms教程:实现键盘左、右方向键翻页的方法

相关文章

最新文章