弹出框weeboxs 基本属性总结

8 篇文章 0 订阅

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


boxid: null, //设定了此值只后,以后在打开同样boxid的弹窗时,前一个将被自动关闭  

type: 'dialog', //弹窗类型,目前有dialog,error,warning,success,wee,prompt, box六种  

contentType: 'text',//内容获取方式,目前有三种text,selector,ajax  

contentChange: false,//selector

  

title: '', //弹窗标题  

width: 0, //弹窗宽度,不设时,会自动依据内容改变大小     

height: 0, //弹窗高度(注意是内容的高度,不是弹窗的高度)  

showTitle: true,//是否显示标题  

showButton: true,//是否显示按钮,包括确定和取消     

showCancel: true, //是否显示取消按钮  

showOk: true, //是否显示确定按钮  

okBtnName: '确定',//"确定"按钮名称  

cancelBtnName: '取消',//"取消"按钮名称

 

boxclass: null, //给弹窗设置其它的样式,用此可以改变弹窗的样式 

modal: true, //是否显示遮照   

overlay: 75, //遮照透明度  

zIndex: 999,//默认弹窗的层  

animate: false,//效果显示     

position: 'center',//弹窗打开后的默认为中间,设置为element时,需要设置trager选项,  

draggable: true,//是否可以拖拽  

trigger: null, //显示位置的参照元素,为一个元素id  

focus: null, //弹窗打开后,焦点移到什么元素上,默认移到取消按钮到

clickClose: false, //点击不在弹窗上时,是否关闭弹窗

timeout: 0, //自动关闭的秒数,设置此值后,窗口将自动关闭 

 

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 });

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值