找到系统--数据表与系统模型--管理数据表,选择要修改的表的字段,
进入管理字段之后选择修改系统字段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 复制地址
本站内容除特别注明外,均为《董为坚个人网》原创,欢迎转载!转载请注明本文地址,谢谢!
- 2023-1-22 17:41:09帝国CMS7.5支持PHP7.*系列,兼容性更好
- 2023-1-22 2:37:50调用当前“结合项”属性下的文章数量
- 2023-1-15 17:41:10帝国CMS官方互联登录插件登录后返回当前地址
- 2023-1-15 17:37:11帝国CMS如何调用栏目别名
- 2023-1-15 14:01:40帝国在封面页显示当前栏目下的二级栏目、三级栏目下的所
暂无评论