標籤:his elements ext javascrip ott asc content nload mat
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>無標題文檔</title><script>/*var i = 0;i++;if( i === 5 ){i = 0;}i%=5;a = a + b;a += b;‘200‘==200、!=‘200‘===200、!==*/var s = 3605;// 秒alert( Math.floor(s/60) + ‘分‘ + s%60 + ‘秒‘ );window.onload = function (){var aLi = document.getElementsByTagName(‘li‘);var arr = [ ‘red‘, ‘yellow‘ ];var str = ‘‘;for( var i=0; i<aLi.length; i++ ){aLi[i].index = i;aLi[i].style.background = arr[i%arr.length];aLi[i].onmouseover = function (){str = this.style.background;// 先存顏色this.style.background = ‘gray‘;};aLi[i].onmouseout = function (){// this.style.background = arr[this.index%arr.length];this.style.background = str;};}};</script><style>li { height:24px; margin-bottom:3px; list-style:none; }</style></head><body><ul id="ul1"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul></body></html>
js中運算子