摘要:
HTML Code:JS Code:function changeClock() { var d = new Date(); var mm = (d.getMinutes() < 10) ? ('0' + d.getMinutes()):d.getMinutes(); //条件运算符给小于10的时间前补0 var ss = (d.getSeconds() < 10) ? ('0' + d.getSeconds()):d.getSeconds(); document.getElementById("clock").innerHTML 阅读全文