EasyUI 创建对话框

对话框是特殊的窗口,它能包括上面的工具栏和下面的按钮。默认对话框不能改变大小,但是用户可以设置resizeable属性为true来使它可以被改变大小:
\
对话框非常简单,可以使用DIV标记创建:

<div id="dd" style="padding:5px;width:400px;height:200px;">

    Dialog Content.

</div>

$('#dd').dialog({

    title:'My Dialog',

    iconCls:'icon-ok',

    toolbar:[{

        text:'Add',

        iconCls:'icon-add',

        handler:function(){

            alert('add')

        }

    },'-',{

        text:'Save',

        iconCls:'icon-save',

        handler:function(){

            alert('save')

        }

    }],

    buttons:[{

        text:'Ok',

        iconCls:'icon-ok',

        handler:function(){

            alert('ok');

        }

    },{

        text:'Cancel',

        handler:function(){

            $('#dd').dialog('close');

        }

    }]

});
posted @ 2016-09-27 10:21  芜明-追星  阅读(298)  评论(0)    收藏  举报