<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>jquery模拟鼠标点击事件</title>
<script type="text/
javascript" src="/js/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function(){
$("#a").click(function(){
alert('当前鼠标点击对象的 id 值为:'+$(this).attr('id'));
});
$("#b").click(function(){
$("#a").trigger("click");//模拟执行id=a的事件
});
});
</script>
</body>
<div id="a" style="width:300px; height:200px; background-color:#999;">a</div>
<div id="b" style="width:300px; height:200px; background-color:#999; margin:30px 30px;">b</div>
</html>