1 ,对话框 :
- 代码 :
$('#tan01').dialog({
title: '王婷婷请选择',
content:"是否爱老公",
width: 400,
height: 200,
modal: true,
resizable:false,
draggable:false,
toolbar:[{
text:"编辑",
iconCls:"icon-edit",
handler:function () {
alert(111);
}
},{
text:"确定",
iconCls:"icon-ok",
handler:function () {
alert(222);
}
}],
buttons:[{
text:"确定",
plain:true,
iconCls:"icon-ok",
handler:function () {
alert(333);
}
},{
text:"取消",
plain:true,
iconCls:"icon-cancel",
handler:function () {
alert(444);
}
}]
});
<div id="tan01"></div>
- 效果 :
2 ,关闭对话框 :
$('#tan01').dialog("close")
3 ,打开对话框 :
$('#tan01').dialog("open")