jquery右下角滑出提醒框
更新:HHH   时间:2023-1-7


 

 

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml"> 
  3. <head> 
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
  5. <script src="jquery-1.2.6.pack.js"></script> 
  6. <script src="jquery.messager.js"></script> 
  7. <script> 
  8. $(document).ready(function(){ 
  9.     $.messager.show(0,'送你一个Jquery Messager消息弹出插件!'); 
  10.     $("#showMessager300x200").click(function(){ 
  11.         $.messager.lays(300, 200); 
  12.         $.messager.show(0, '300x200的消息<br>脚本之家(JB51.net)提供各类编程源码、书籍教程、JavaScript/CSS特效代码以及常用软件下载等,做有质量的学习型×××站。'); 
  13.     }); 
  14.     $("#showMessagerFadeIn").click(function(){ 
  15.         $.messager.anim('fade', 2000); 
  16.         $.messager.show(0, 'fadeIn动画消息'); 
  17.     }); 
  18.     $("#showMessagerShow").click(function(){ 
  19.         $.messager.anim('show', 1000); 
  20.         $.messager.show(0, 'show动画消息'); 
  21.     }); 
  22.     $("#showMessagerajax").click(function(){ 
  23.         $.messager.anim('show', 1000); 
  24.         $.messager.show('源码爱好者', '使用“源码爱好者”作标题'); 
  25.     }); 
  26.     $("#showMessagerDim").click(function(){ 
  27.         $.messager.show('<font color=red>自定义标题</font>', '<font color=green style="font-size:14px;font-weight:bold;">自定义内容</font>'); 
  28.     }); 
  29.     $("#showMessagerSec").click(function(){ 
  30.         $.messager.show(0, '一秒钟关闭消息', 1000); 
  31.     }); 
  32.     $("#showMessagerNoClose").click(function(){ 
  33.         $.messager.show('不会关闭的消息', '要自己点关闭的X才可以哦!', 0); 
  34.     }); 
  35. }); 
  36. </script> 
  37. <style type="text/css"> 
  38. <!-- 
  39. body,td,th { font-size: 12px; } 
  40. body { background-color: #fefefe; } 
  41. p   { width:80%; height:auto; padding:10px; background-color:#D6F097; border:solid 1px #FF9900; color:#333; margin-left:auto; margin-right:auto;} 
  42. input   { background-color:#F5D99E; color:#333; border:solid 1px #993300; font-size:12px;} 
  43. p.new input { background-color:#FF0000; color:#fff;} 
  44. --> 
  45. </style></head> 
  46.  
  47. <body> 
  48. <h3>JQUEYR 右下角滑出提醒框</h3> 
  49. <p><b>版本1.4更新:</b><Br />1、支持鼠标over时不关闭消息提示框<br /><b>版本1.3更新:</b><br /> 
  50. 1、可以设置不自动关闭,停留在固定位置。<br /> 
  51. 2、增加了对UA的判断能力和效果解析<br /> 
  52. 3、针对chrome下的错位给予了一定的修补,目前效果还算可以<br /> 
  53. 4、针对代码段做了调整优化<br /></p> 
  54. <p><input type="button" id="showMessager300x200" value="显示一个300x200的消息" /></p> 
  55. <p><input type="button" id="showMessagerFadeIn" value="显示一个fadeIn动画消息" /></p> 
  56. <p><input type="button" id="showMessagerShow" value="显示一个show动画消息" /></p> 
  57. <p><input type="button" id="showMessagerajax" value="显示一个show动画消息,不含html" /></p> 
  58. <p><input type="button" id="showMessagerDim" value="显示定义内容和标题消息" /></p> 
  59. <p><input type="button" id="showMessagerSec" value="一秒钟关闭消息" /></p> 
  60. <p class="new"><input type="button" id="showMessagerNoClose" value="不自动关闭消息" /></p> 
  61. <br /> 
  62. </body> 
  63. </html> 

 

附件:http://down.51cto.com/data/2361154
返回web开发教程...