dedecms自定义表单怎么添加发布时间功能

<input type="text" name="shijian" id="shijian" value=""> 
<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.getElementByIdx_x("shijian").value=str; 
} //phpfensi.com 
</script>

 

posted @   黄文Rex  阅读(2)  评论(0编辑  收藏  举报
(评论功能已被禁用)
点击右上角即可分享
微信分享提示