自定义表单在模板中修改如下:
<form action="/plus/diy.php" enctype="multipart/form-data" method="post" name="form" onsubmit="return CheckForm();"> <input type="hidden" name="action" value="post" /> <input type="hidden" name="diyid" value="1" /> <input type="hidden" name="do" value="2" /> 提交时间 <input name="mytime" value="" type="text" id="mytime" /><!-- 如不需要在前台显示的话可以修改type="hidden" --> <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("mytime").value=str; } </script> <input type="hidden" name="dede_fields" value="mytime,textchar" /> <input type="hidden" name="dede_fieldshash" value="849a871768b5942ee259e8f7af736194" /> <label><input class="btn_tj" type="submit" name="Submit" value=" 提交" /></label></form> |
新闻热点
疑难解答