87,904
社区成员
发帖
与我相关
我的任务
分享
$(document).ready(function()
{
$("#1").hover(function()
{
$("#2").css("background-color","brown");
});
$("#1").mouseout(function()
{
$("#2").css("background-color","green");
});
});
<div id="1" style="width: 200px;height: 200px;background-color: red;margin-bottom: 10px;">
<a>hehe</a>
</div>
<div id="2" style="width: 200px;height: 200px;background-color: green;margin-bottom: 10px;"></div>