AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > 网页制作

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

51自学网 http://www.wanshiok.com
html,本地系统时间
复制代码
代码如下:

<div id="名称">
<script language=Javascript>
var now=new Date()
document.write(1900+now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds())
</script>
</div>

为什么用div呢,为了选择位置来放,比如我是放在
html,本地系统时间  
上一篇:表单文件选择框样式自定义示例  下一篇:html 网页中的锚点(命名锚记)的使用介绍