使用前需包含以下jquery.js、bgiframe.js、weebox.js、wee.css文件
基本用法举例如下:
$.weeboxs.open(‘#testbox’, {title: ‘hello world’, width:400, height: 200});
$.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 });
以下是默认选项:
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, //是否显示遮照