您现在的位置: 万盛学电脑网 >> 程序编程 >> 脚本专题 >> javascript >> 正文

jQuery实现鼠标悬停显示提示信息窗口的方法

作者:佚名    责任编辑:admin    更新时间:2022-06-22

   本文实例讲述了jQuery实现鼠标悬停显示提示信息窗口的方法。分享给大家供大家参考。具体实现方法如下:

  ?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>鼠标悬停显示提示信息窗口</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type="text/css"> .contact{width:100px;height:15px; margin:20px 0 0 50px;background-color:#CCCCCC; text-align:center; } .us{display:none;width:300px;height:40px; padding:10px;position:relative;top:0px;left:50px; background-color:#0099FF; } </style> <script src="jquery-1.6.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".contact").mouseover(function(){ $(".us").show("slow"); $(".contact").mouseout(function(){ $(".us").hide("slow"); }); }); }) </script> </head> <body> <div class="contact">联系我们</div> <div class="us">提示内容!提示内容!提示内容!</div> <div>http://www.jb51.net/</div> </body> </html>

  希望本文所述对大家的jQuery程序设计有所帮助。