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, //顯示位置的參照元素,為一個元素id showTitle: true,//是否顯示標題 showButton: true,//是否顯示按鈕,包括確定和取消 showCancel: true, //是否顯示取消按鈕 showOk: true, //是否顯示確定按鈕 okBtnName: '確定',//"確定"按鈕名稱 cancelBtnName: '取消',//"取消"按鈕名稱 contentType: 'text',//內容獲取方式,目前有三種text,selector,ajax contentChange: 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 }); |