html中使用js来获取本地系统时间的方法

  介绍

小编给大家分享一下html中使用js来获取本地系统时间的方法,希望大家阅读完这篇文章后大所收获、下面让我们一起去探讨吧!

代码如下:

& lt; div id=懊啤氨?   & lt;脚本语言=Javascript>   现在var=新的日期()   document . write (1900 + now.getYear() +“产生绯闻;+ (now.getMonth() + 1) +“产生绯闻;+ now.getDate () +“;“+ now.getHours () +“:“+ now.getMinutes () +“:“+ now.getSeconds ())   & lt;/script>   & lt;/div>

看完了这篇文章,相信你对html中使用js来获取本地系统时间的方法有了一定的了解,想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!

html中使用js来获取本地系统时间的方法