弹出框weeboxs 基本属性总结

来源:互联网 发布:甲骨文java大赛试题 编辑:程序博客网 时间:2024/06/16 05:47

使用前需包含以下jquery.js、bgiframe.js、weebox.js文件

boxid: null, //设定了此值只后,以后在打开同样boxid的弹窗时,前一个将被自动关闭boxclass: null, //给弹窗设置其它的样式,用此可以改变弹窗的样式type: 'dialog', //弹窗类型,目前有dialog,error,warning,success,wee,prompt,box六种title: '', //弹窗标题width: 0, //弹窗宽度,不设时,会自动依据内容改变大小height: 0, //弹窗高度(注意是内容的高度,不是弹窗的高度)timeout: 0, //自动关闭的秒数,设置此值后,窗口将自动关闭draggable: true,//是否可以拖拽modal: true, //是否显示遮照overlay: 75, //遮照透明度focus: null, //弹窗打开后,焦点移到什么元素上,默认移到取消按钮到position: 'center',//弹窗打开后的默认为中间,设置为element时,需要设置trager选项,trigger: null, //显示位置的参照元素,为一个元素idshowTitle: true,//是否显示标题showButton: true,//是否显示按钮,包括确定和取消showCancel: true, //是否显示取消按钮showOk: true, //是否显示确定按钮okBtnName: '确定',//"确定"按钮名称cancelBtnName: '取消',//"取消"按钮名称contentType: 'text',//内容获取方式,目前有三种text,selector,ajaxcontentChange: false,//为selector时clickClose: false, //点击不在弹窗上时,是否关闭弹窗zIndex: 999,//默认弹窗的层animate: false,//效果显示onclose: null, //弹窗关闭时触发的函数onopen: null, //弹窗显示前触发的函数, 此时内容已经放入弹窗中,不过还没有显示出来onok: null ,//点击确定按钮后 oncancel:null //点击取消按钮触发函数$.weeboxs.open('The operation failed.',{onopen:function(){alert('opened!');},onclose:function(){alert('closed!');}, onok:function(){alert('ok');$.weeboxs.close();} });$.weeboxs.open('/modules/test/testsession.php', {contentType:'ajax'});$.weeboxs.open('hello world');$.weeboxs.open('The operation failed.',{type:'error'});$.weeboxs.open('The operation failed.',{type:'wee'});$.weeboxs.open('The operation failed.',{type:'success'});$.weeboxs.open('The operation failed.',{type:'warning'});$.weeboxs.open('Autoclosing in 5 seconds.', { timeout: 5 });