日期:2014-05-16 浏览次数:20359 次
<script>
function changecolor(color){
document.getElementById("Div_1").style.background=color;
document.getElementById("Div_2").style.background=color;
}
</script>
<div onmousemove="changecolor('green')" onmouseout=changecolor('white') id="Div_2" style="border:5px solid red;width:100px;height:100px">fuckDiv</div>
<div onmousemove="changecolor('green')" onmouseout=changecolor('white') id="Div_1" style="border:1px solid blue;width:100px;height:100px;">thisDiv</div>