<!doctype html>
无标题文档 .style01{ width:200px; height:200px; float:left; background:#F63; } var rows=document.getElementsByClassName("style01") for(i=1;i<rows.length;i++){ rows[i].onMouseOver=function(){ this.style.border="#000 solid 1px" } rows[i].onMouseOut=function(){ this.style.border="0" } }