草庐IT

javascript - this.name 在 javascript 中返回 undefined

我正在尝试远程创建一个onclick对于每个(以节省打字时间)。这是window.onload()功能:window.onload=function(){divel=document.getElementsByTagName('div');for(varelindivel){divel[el].onmouseover=function(){this.style.textDecoration="underline";};divel[el].onmouseout=function(){this.style.textDecoration="none";};divel[el].onclick=