jquery弹出层插件jquery.msgbox5.0-懒人建站收集
项目下载地址:
http://code.google.com/p/jquery-msgbox/downloads/list
你也可以在懒人建站下载。懒人建站的压缩包中已带有演示。
最简单的调用方式:
$.msgbox(""); //the string is directly allocated as this: //$.msgbox("Hello, world!")
提示:可修改部分代码后运行
文本提示:
$.msgbox({ closeImg: 'close.gif', height:500, width:600, content:'Hello, world!', type :'text' });
提示:可修改部分代码后运行
警告框:
$.msgbox({ closeImg: 'close.gif', height:130, width:250, content:'Hello, world!', type :'alert', bgAnimate: false, // 禁止背景动画 boxAnimate: false, // 禁止提示框动画 enableDrag: false // 禁止拖拽 });
提示:可修改部分代码后运行
确认框:
$.msgbox({ closeImg: 'close.gif', height:130, width:250, content:'Hello, world?', type :'confirm', onClose:function(v){ if(v) alert("You've clicked 'Yes' button!"); else alert("You've clicked 'No' button or closed me!"); } });
提示:可修改部分代码后运行
自动关闭:
$.msgbox({ autoClose:10, closeImg: 'close.gif', height:500, width:600, content:'Hello, world!', type :'text' });
提示:可修改部分代码后运行
关闭后事件(可见确认框):
$.msgbox({ closeImg: 'close.gif', height:500, width:600, content:'Hello, world!', type :'text', onClose: function(){alert('你。。。你居然把我关了!')} });
提示:可修改部分代码后运行
Ajax:
$.msgbox({ closeImg: 'close.gif', height:500, width:600, content:'http://51xuediannao.com', type :'ajax', title: 'PWWANG.COM' });
提示:可修改部分代码后运行
Ajax完成后事件:
$.msgbox({ closeImg: 'close.gif', height:500, width:600, content:'http://51xuediannao.com', type :'ajax', title: 'PWWANG.COM', onAjaxed: function(data){alert(data)} });
提示:可修改部分代码后运行
iframe:(从外部关闭msgbox)
$.msgbox({ closeImg: 'close.gif', height:500, width:600, content:'outClose.html', type :'iframe', title: '从外部关闭msgbox' }); // 外部关闭提示框代码: 最简单的方式 $.closemsgbox(top.window.document) // $.closemsgbox({ // document : top.window.document, // bgAnimate: true, // 允许背景动画 // boxAnimate: true, // 允许提示框动画 // onClose: function() // 关闭时的事件 //});
提示:可修改部分代码后运行
input:
$.msgbox({ closeImg: 'close.gif', height:500, width:600, content:'请输入: ', type :'input', title: '请输入一个值', onInputed: function(v){alert('你输入的是:'+v)} });
提示:可修改部分代码后运行
本代码由
懒人建站网 收集整理 我要学电脑.COM →51xuediannao.com
懒人建站 http://www.51xuediannao.com
我们为您提供-
HTML+CSS模板
,
JS代码
,
网页特效
,
导航菜单
,
焦点幻灯片
,
网页欣赏
和
CSS技巧
;
懒人建站只收录实用和能提高用户体验的代码
我们只想解放出你的部分写代码时间来思考更高层次的设计,而不是要你懒惰、拼凑。