一段鼠标滑过替换lj 标签CSS 样式(背景)的JavaScript
var allLi=document.getElementById("slideUl_a");
var classCss=" ;background:#FEFAF1;border:1px solid #FED79E;";
var classCss2=" ;background:#fff;border:1px solid #fff;";
var allLiQuery=allLi.getElementsByTagName("li");
var lilen=allLiQuery.length;
for(var i =0;i<lilen;i++){
allLiQuery[i].onmouseover=function(){
this.style.cssText+=classCss;
}
allLiQuery[i].onmouseout=function(){
this.style.cssText+=classCss2;
}
}
from http://www.laifuying.com/archives/554
标签:CSS, JavaScript