window.onload=function() { ? ?var oli = document.getElementsByTagName("li"); ? ?var i = 0; ? ?for (i = 0; i < oli.length; i++) { ? ? ? ?oli[i].index = i; ? ? ? ?oli[i].onmouseover = function () {? ? ? ? ?? ? ? ? ? ? ?this.style.background = "url(xz.gif) no-repeat 0 0";? ? ? ? ? ?? ? ? ? ? ?}? ? ?? ? ? ? ? ?}}
我想問下,以下這段代碼中加粗的this為什么不能替換成oli[i]呢
慕田峪8701529
2017-05-10 22:02:27