var date=new Date; console.log(date);// Mon Oct 31 2016 23:29:07 GMT+0800 (中国标准时间)<br>console.log(date.toString());//Mon Oct 31 2016 23:29:07 GMT+0800 (中国标准时间)
var date=new Date(); console.log(date.valueOf());//1477927747916 1477927747916毫秒算下来刚好是46年多。
var date=new Date(); console.log(date.toLocaleString());//2016/10/31 下午11:29:07
var time=new Date(Date.parse("October 31,2016"));
console.log(time);//Mon Oct 31 2016 00:00:00 GMT+0800 (中国标准时间)
var Time=new Date("October 31,2016");
console.log(Time);//Mon Oct 31 2016 00:00:00 GMT+0800 (中国标准时间)
var dateTime=new Date(Date.UTC(2016,9,31,23,26,50));
console.log(dateTime);//这是一个bug Tue Nov 01 2016 07:26:50 GMT+0800 (中国标准时间)
var Timedate=new Date(2016,9,31,23,26,50);
console.log(Timedate);//Mon Oct 31 2016 23:26:50 GMT+0800 (中国标准时间)
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="2">
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="time"></div>
<script>
var date=new Date();
var time=document.getElementById("time");
setInterval(function(){
time.innerHTML=date.toLocaleString();
},1);
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="time"></div>
<script>
var date=new Date();
var time=document.getElementById("time");
function reload(){
window.location.reload();
}
setInterval(function(){
reload();
},1000);
setInterval(function(){
time.innerHTML=date.toLocaleString();
},1000);
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="2">
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="time"><img src="时钟.jpg"/>我是桌面上的时钟,哈哈</div>
<div id="bottom">
</div>
<script>
var date=Date.now();
var time=document.getElementById("time");
var para=document.createElement("p");
time.appendChild(para);
setInterval(function(){
para.innerHTML=date.toLocaleString();
},1000);
</script>
</body>
</html>
<embed align="center" src="告白气球.mp4" type="audio/mpeg" width="1002" autostart="false" controls="controls" height="500" ></embed>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <iframe src="test.html" width="200" height="30" seamless="seamless" scrolling="no" ></iframe> <p>我是页面上的时钟,哈哈</a> </body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="time"></div>
<script>
var date=new Date();
var time=document.getElementById("time");
function reload(){
window.location.reload();
}
setInterval(function(){
reload();
},1000);
setInterval(function(){
time.innerHTML=date.toLocaleString();
},1000);
</script>
</body>
</html>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有