一、window彈出框按鈕事件
1 $.window({ 2 _oa_id:'name', 3 title:title, 4 height:height, 5 width:width, 6 iframe:true, 7 href:'', 8 hsabutton:flase, 9 on_my_close:function(){ 10 } 11 });
$.window({ 2 _oa_id:'name', 3 title:title, 4 height:height, 5 width:width, 6 iframe:true, 7 href:'', 8 hsabutton:true,
9 buttons:function(){
10 text:'確定',
11 handler:function(){
12 }
13 14 on_my_close:function(){ 15 } 16 });
右上角關閉按鈕在 on_my_close下寫事件即可,如果需要添加按鈕,將hasbutton設置為true添加事件
二、alert彈出事件
var msg=$.messager.alert("提示信息","請重新輸入","info"); msg.window({ modal:true, onBeforeClose:function(){ window.close(); } });
點擊確定和右上角關閉會執行相同事件