找到系统--数据表与系统模型--管理数据表,选择要修改的表的字段,
进入管理字段之后选择修改系统字段newstime
将输入表单替换html代码
替换为:
<input name="newstime" type="text" value="<?=$r[newstime]?>" size="28" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss'})"><input type=button name=button value="设为当前时间" onclick="CurentTime()">
<script>
function CurentTime()
{
var now = new Date();
var year = now.getFullYear(); //年
var month = now.getMonth() + 1; //月
var day = now.getDate(); //日
var hh = now.getHours(); //时
var mm = now.getMinutes(); //分
var ss = now.getSeconds(); //秒
var clock = year + "-";
if(month < 10)
clock += "0";
clock += month + "-";
if(day < 10)
clock += "0";
clock += day + " ";
if(hh < 10)
clock += "0";
clock += hh + ":";
if (mm < 10) clock += '0';
clock += mm + ":";
if (ss < 10) clock += '0';
clock += ss;
/*return(clock);
$todaytime*/
document.add.newstime.value=clock;
}
</script>
OK,完成了!
扫一扫 在手机阅读、分享本文
版权所有:《董为坚个人网》
本文地址:https://www.dwjgrw.cn/Content/id/115.html 复制地址
本站内容除特别注明外,均为《董为坚个人网》原创,欢迎转载!转载请注明本文地址,谢谢!
- 2022-5-17 22:57:08php 写入 access数据库,php实现连接ac
- 2022-5-15 21:42:01php中post的提交
- 2022-3-31 21:14:58分享本站日期API获取当前节日
- 2017-8-29 14:06:48帝国cms批量添加栏目修改方法
- 2017-8-7 14:24:43帝国cms全站搜索支持标签调用设置
暂无评论