js动态显示实时时间
2017-04-08 10:52
393 查看
利用js动态显示实时时间
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <script type="text/javascript"> function showTime(){ nowtime=new Date(); year=nowtime.getFullYear(); month=nowtime.getMonth()+1; date=nowtime.getDate(); document.getElementById("mytime").innerText=year+"年"+month+"月"+date+" "+nowtime.toLocaleTimeString(); } setInterval("showTime()",1000); </script> </head> <body> <span id="mytime"></span> </body> </html>
相关文章推荐
- JS显示动态时间
- js动态显示时间
- JS动态显示当前系统时间
- 简单用js实现网页时间的实时显示
- JS实现动态显示当前时间(12/24小时制)(转载Mr.Think)
- 实时显示系统时间(JS)
- js实时显示系统时间
- js动态显示时间
- js显示动态时间年月日时分秒
- 几个国家时间同步动态显示js代码
- JS实时显示当前时间(IE+firefox)浏览器兼容代码(图证)
- js实时时间显示,兼容IE、Opera、Firefox,javascript面向对象编程。
- js动态显示当前日期,时间和星期代码
- html中用js动态显示时间总结
- js动态显示当前日期,时间和星期代码
- 转载:JS实时显示系统时间
- 用JS实现显示当前时间(实时变化)
- js 动态显示时间
- 中信-js对象的使用(实现的显示时间动态变化)
- JS实现动态显示当前时间(12/24小时制)