dedecms自定義表單中加入用戶提交時間織夢技巧
導讀:織夢技巧織夢技巧一、在自定義表單中添加字段 添加時間字段 timesj 二、在調用表單的頁面中加入 input name=timesj value= type=hidden iseo網站優化網站優化seo培訓。
一、在自定義表單中添加字段 添加時間字段 timesj 二、在調用表單的頁面中加入 input name=timesj value= type=hidden id=timesj style=width:250px class=intxt script type=text/javascript window.onload = function(){ v […]
<input name="timesj" value="" type="hidden" id="timesj" style="width:250px" class="intxt">
<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("timesj").value=str; } </script>或者 <input type="hidden" name="timesj" id="timesj" value="{dede:php} echo $showtime=date('Y-m-d H:i:s');{/dede:php}"> 此種方法好像生成的時間是靜態的。
或者 <input type='hidden' n如何seo優化推廣網站ame='timesj' id='timesj'/> <script language="javascript" type="text/javascript"> var wdtime= new Date(); document.getElementById("timesj").value=wdtime.toLocaleString(); </script>以上表單中使用了type=hidden,所以是隱藏模式。
三、在系統模板中添加 plus/diy_list網站seo優化培訓.htm 42的else前面或后面加入if($fielddata[1]=='datetime')
{ $fields[$field] = GetDateTimeMk($fields[$field]); } 經過以上三步的處理,用戶在前臺填表后,管理后臺就能看到用戶添加的時間了。相關seo網站優化網站優化seo培訓。聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-26 ,文章dedecms自定義表單中加入用戶提交時間織夢技巧主要講述自定義,表單,dedecms自定義表單中加入用戶提交時網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_9998.html