<script language=Javascript>var now=new Date()document.write(1900+now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+now.getHours()+":"+n" /> <script language=Javascript>var now=new Date()document.write(1900+now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+now.getHours()+":"+n" /> <script language=Javascript>var now=new Date()document.write(1900+now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" "+now.getHours()+":"+n" />

首页 / 知识

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

2023-04-11 15:44:00

html中使用js来获取本地系统时间
复制代码
代码如下:

<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> 

系统时间代码复制名称获取id

最新内容

相关内容

热门文章

推荐文章

标签云

猜你喜欢