織夢自定義表單添加提交時間

添加「time」屬性 增長javascript

<input name="time" value="" type="hidden" id="time" />

 

修改帶時間的加密串java

 

<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("time").value=str;
}
</script>    
    
相關文章
相關標籤/搜索