HTML代码:定义两个DIV并设置大小宽度
<div id="Div1" class="div-list" style="width:20px; height:50px; border:1px solid #F00"><a>DIV1</a></div><div id="Div2" class="div-list1" style="width:20px; height:50px; border:1px solid #F00"><a>DIV2</a></div>
JS代码:调用Hover事件并遍历所有DIV
<script type="text/javascript">$(function () { $("div").hover(function () { var id = $(this).attr("id"); alert(id); }) })</script>