验证中...
私信发送成功
片段 1 片段 2
gistfile1.txt
原始数据 复制代码
var ArrayImage = new Array("imag/0.gif","imag/1.gif","imag/2.gif","imag/3.gif","imag/4.gif","imag/5.gif",
"imag/6.gif","imag/7.gif","imag/8.gif","imag/9.gif","imag/mh.gif");
function change(num) {
var str="";
if(num<10){
str+="0"+num;
}else{
str=num;
}
return str;
}
function showTime() {
var now =new Date();
/* var getYears = now.getFullYear();
var getMonth = now.getMonth()+1;
var getDates= now.getDate();*/
var getHourse = change(now.getHours()).toString();
var getMi =change(now.getMinutes()).toString();
var getSe =change(now.getSeconds()).toString();
var str1="";
for(var i=0;i<getHourse.length;i++){
str1+="<img src="+ArrayImage[getHourse[i]]+">";
}
str1+="<img src="+ArrayImage[10]+">";
for(var i=0;i<getMi.length;i++){
str1+="<img src="+ArrayImage[getMi[i]]+">";
}
str1+="<img src="+ArrayImage[10]+">";
for(var i=0;i<getSe.length;i++){
str1+="<img src="+ArrayImage[getSe[i]]+">"
}
document.getElementById("TimeShow").innerHTML=str1;
//循环分钟
/* document.getElementById("TimeShow").innerHTML=getHourse+":"+getMi+":"+getSe+":";*/
setTimeout(showTime,1000);
}
<body onload="showTime()">
<div id="TimeShow"></div>
</body>
4.png

评论列表( 0 )

你可以在登录后,对此项目发表评论

4_float_left_people 4_float_left_close