日期:2014-05-16  浏览次数:20313 次

显示时间的js

<script>function show(){
    var t=new Date();var h=t.getHours();var m=t.getMinutes();
    var s=t.getSeconds();if(h<10)h="0"+h;if(m<10)m="0"+m;if(s<10)s="0"+s;
    document.f1.h2.value=h+":"+m+":"+s;setTimeout("show()","1000")}show()
    </script>