效果: 代码: 复制代码 代码如下: <BR> function toDou(n) {<BR> if (n < 10) {<BR> return '0' + n;<BR> }<BR> else {<BR> return '' + n;<BR> }<BR> }<BR> setInterval(<BR> window.onload = function () {<BR> var aImg = document.getElementsByTagName('img');<BR> var oDate = new Date();<BR> var str = toDou(oDate.getHours()) + toDou(oDate.getMinutes()) + toDou(oDate.getSeconds());<BR> for (var i = 0; i < str.length; i++) {<BR> aImg[i].src = 'Images/Number1/' + str[i] + '.jpg';<BR> }<BR> }, 1000); <P> : src="Images/Number1/0.jpg" />: src="Images/Number1/0.jpg" />