欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Javascript實(shí)現(xiàn)倒計(jì)時(shí)時(shí)差效果

 更新時(shí)間:2017年05月18日 10:13:54   作者:青蛙魔法師  
這篇文章主要為大家詳細(xì)介紹了Javascript實(shí)現(xiàn)倒計(jì)時(shí)時(shí)差效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了js倒計(jì)時(shí)時(shí)差效果的實(shí)現(xiàn)代碼,供大家參考,具體內(nèi)容如下

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>當(dāng)前系統(tǒng)時(shí)間</title>
<link rel="stylesheet" href="style.css" />
<script language="javascript" type="text/javascript">

 window.onload = function(){
 showTime();
 }
 function checkTime(i){ //補(bǔ)位處理
 if(i<10){
  i='0'+i;
 }
 return i;
 }
 function showTime(){
 var now=new Date();
 var year= now.getFullYear();
 var month= now.getMonth()+1;
 var day= now.getDate();
 var h= now.getHours();
 var m= now.getMinutes();
 var s= now.getSeconds();
 m=checkTime(m);
 s=checkTime(s);

 var weekday=new Array(7)
 weekday[0]="星期日"
 weekday[1]="星期一"
 weekday[2]="星期二"
 weekday[3]="星期三"
 weekday[4]="星期四"
 weekday[5]="星期五"
 weekday[6]="星期六"

 document.getElementById("show").innerHTML=""+year+"年"+month+"月"+day+"日 "+ ? +h+":"+m+":"+s;
 t=setTimeout('showTime()',500)
 }

</script>
</head>
<body>
<div class="content1">
 <div id="show">顯示時(shí)間的位置</div>
</div>
</body>
</html>

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論