Posted in Javascript onApril 25, 2014
<script language="javascript" src="jquery-1.4.2.min.js"></script> <script> function show(obj,id) { var objDiv = $("#"+id+""); $(objDiv).css("display","block"); $(objDiv).css("left", event.clientX); $(objDiv).css("top", event.clientY + 10); } function hide(obj,id) { var objDiv = $("#"+id+""); $(objDiv).css("display", "none"); } </script> <!--http://www.ablanxue.com/prone_3421_1.html--> <div id="mydiv1" style="position:absolute;display:none;border:1px solid silver;background:silver;"> 提示1效果 </div> <div id="mydiv2" style="position:absolute;display:none;border:1px solid silver;background:silver;"> 提示2效果 </div> <a id="t1" onMouseOver="javascript:show(this,'mydiv1');" onMouseOut="hide(this,'mydiv1')">鼠标放上去1</a> <br><br><br><br><br> <a id="t2" onMouseOver="javascript:show(this,'mydiv2');" onMouseOut="hide(this,'mydiv2')">鼠标放上去2</a>
jquery鼠标放上去显示悬浮层即弹出定位的div层
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@