easyui 彈出框\windows彈窗 確定和右上角x關閉按鈕點擊事件


一、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();
    }
});

點擊確定和右上角關閉會執行相同事件


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM