在网页中动态显示当前的系统日期和时间(最简代码)

来源:互联网 发布:最新网络数字用语1 编辑:程序博客网 时间:2024/05/21 19:23
方法一:格式如(2008年6月19日 21:19:29)<span   id=sTime>      <script>setInterval("document.all.sTime.innerText=new   Date().toLocaleString()",1000)</script></span>  

方法一:格式如(2008年6月19日 21:19:49 星期四)<span class="STYLE1" id=jnkc>          <script>setInterval("jnkc.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt (new Date().getDay());",1000);</script></span>

原创粉丝点击