function navTopMouseOver(navDivId, navTopAClass, navTopAOverClass){var collTopANodes = document.getElementById(navDivId).getElementsByTagName("a");for (var x = 0; x < collTopANodes.length; x++) {collTopANodes[x].onmouseover = function(){collTopANodes[x].className = navTopAOverClass;}();}}我想實(shí)現(xiàn)在節(jié)點(diǎn)對象上鼠標(biāo)進(jìn)入就改變class,但是這段代碼在網(wǎng)頁一加載,我還沒有讓鼠標(biāo)經(jīng)過,它的class就變了,而且不循環(huán),只有第一個節(jié)點(diǎn)對象會變,這是怎么回事?
為什么只有第一個節(jié)點(diǎn)對象會變,這是怎么回事???
神不在的星期二
2023-04-09 17:13:16