織夢dedecms怎樣讓在自定義表單顯示時間,dedecms
導讀:dedecmsdedecms首先打開織夢自定義表單,然后添加字段,比如聯(lián)系人(單行文本),聯(lián)系方式(單行文本),地址(單行文本),留言內(nèi)容(單行文本),留言時間(單行文本)等字段織夢首頁模板dede模板免費。
以下是部分代碼,紅色部分,即為調(diào)用的時間代碼。其他代碼,可在圖3頁面,右鍵查看源代碼獲取,謝謝。
圖1
圖2
圖3
-----------------------------------------------------------------------------
首先打開織夢自定義表單,然后添加字段,比如聯(lián)系人(單行文本),聯(lián)系方式(單行文本),地址(單行文本),留言內(nèi)容(單行文本),留言時間(單行文本)等字段
注意:留言時間這里不要選擇“時間類型”,選擇默認的“文本形式”就可以。
自定義表單在模板中修改如下:
<form action="/plus/diy.php" enctype="multipart/form-data" method="post" name="form"
onsubmit="return CheckForm();&qu織夢手機模板ot;>
<input type="hidden" name="action" value="post" />
<input type="hidden" name="diyid" value="1" />
<input type="hidden" name="do" value="2" />
<table width="100%" border="0" cellpadding="0織夢cms模板" cellspacing="0">
<tr>
<td>提交時間</td>
<td><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()+" "+now手機模板dedeDate.getHours()+":"+nowDate.getMinutes()+":"+nowDate.getSeconds();
聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-07-19 ,文章織夢dedecms怎樣讓在自定義表單顯示時間,dedecms主要講述自定義,表單,織夢網(wǎng)站建設源碼以及服務器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_30272.html