jQuery 中msgTips 顶部弹窗效果实现代码

最近发现好多网站都采用顶部弹窗,并且不用用户手动去点击确定。感觉这样很方便用户,所以也找了好多大神的代码,整理一下方便以后查找

前端:

@{ Layout = null; } <!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> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>jQuery网页顶部显示操作提示插件 - 聚合分享 - </title> <link href="https://www.jb51.net/~/top/css/css.css" /> <script src="https://www.jb51.net/~/top/js/jquery-1.8.3.min.js"></script> <script src="https://www.jb51.net/~/top/js/msgTips.js"></script> <script type="text/javascript"> $(function () { $("#ie").manhua_msgTips({ Event: "click", //响应的事件 timeOut: 4000, //提示层显示的时间 msg: "为了保证更好的网站体验,请升级IE版本到8.0或以上!", //显示的消息 speed: 0, //滑动速度 type: "warning" //提示类型(1、success 2、error 3、warning) }); $("#no").manhua_msgTips({ Event: "click", //响应的事件 timeOut: 3000, //提示层显示的时间 msg: "很抱歉!您好操作此插件错误,请重新操作!", //显示的消息 speed: 0, //滑动速度 type: "error" //提示类型(1、success 2、error 3、warning) }); $("#yes").manhua_msgTips({ Event: "click", //响应的事件 timeOut: 2000, //提示层显示的时间 msg: "恭喜你!操作成功,欢迎访问聚合分享网站", //显示的消息 speed: 300, //滑动速度 type: "success" //提示类型(1、success 2、error 3、warning) }); }); </script> <style> input { padding: 10px 20px; } </style> </head> <body> <div> <input type="button" value="警告提示" />&nbsp;&nbsp; <input type="button" value="错误提示" />&nbsp;&nbsp; <input type="button" value="成功提示" /> </div> </body> </html>

个人感觉还是很好用的,这个是从某位大神那里引用来的,如果有冒犯,麻烦告诉我,我会删除的

总结

以上所述是小编给大家介绍的jQuery 中msgTips 顶部弹窗效果实现代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wydjgy.html