1. 程式人生 > >easyui中Dialog彈窗,控制button顯示隱藏

easyui中Dialog彈窗,控制button顯示隱藏

1、主要是在buttons中新增id屬性

parent.$.modalDialog({
    title: '基本資訊',
    width: 600,
    height: 500,
    href: '${path }/xxxx',
    buttons: [{text: '關閉',
        handler: function () {
    parent.$.modalDialog.handler.dialog('close');
}},{
        id:"dispatchBtn",
        text: '確定派單',
        handler: function 
() { parent.$.modalDialog.openner_dataGrid = dataGrid;//因為新增成功之後,需要重新整理這個dataGrid,所以先預定義好 var f = parent.$.modalDialog.handler.find('#dispatchForm'); f.submit(); } }] });

2、在dialog子頁面中,控制按鈕顯示

parent.$('#dispatchBtn').hide();//隱藏儲存按鈕

思路來源