JavaScript 之 swapNode

<html>
<body>
<span id="bb">1</span>
<script>
var aa=new Array(1,2,3,4,5,6,7,8,9,0);
var count=0;
setInterval("bb.innerText=aa[count<aa.length-1?++count:count=0]",1000);
</script>
</body>
</html>

你可能感兴趣的:(JavaScript 之 swapNode)