给织梦cmsDedeCMS自定表格加上当今時间
创作者:随州SEO 公布时间:今年0五月22日 访问:次
织梦cmsDedeCMS自定表格较为灵便,能够二次开发设计成顾客留言板留言板,但唯一中美不够的是,假如客户不积极填好就没法了解留言板留言時间,那样的客户感受是是非非常不太好的,那怎样让织梦cmsDedeCMS自定表格获得当今的系统软件時间呢,只必须,在模版中加上下列编码就可以。 input type= hidden name= date id= date placeholder= 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( date ).value=str; } /script 表格编码中华有的w编码请删掉: input type= text name= date id= date > 文中创作者随州SEO,转截请标明出處。 |