<script>
var oDiv1=document.getElementById('div1');
var oDiv2=oDiv1.getElementsByTagName('div');
for (var i=0;i
oDiv2[i].onmousrover=function ()
{
this.style['background']='red';
}
}
for (var i=0;i
oDiv2[i].onmousrout=function ()
{
this.style['background']='#ccc';
}
}
</script>
当div里放的是图片时该怎么做?谢谢!