-1

Please see below fiddle, I having a button inside dialog,

Fiddle Link

<input type="button" id="closePop" value="Close Dialog"/>

How to close the dialog by clicking "Close Dialog" button? thanks!

4

2 回答 2

1

在对话框的打开功能中附加click事件

$('#closePop').bind('click', function(e) {
    jQuery('#dialog').dialog('close');
});

演示

于 2013-11-12T17:56:15.583 回答
0

您可以通过调用以编程方式关闭它:

$("#dialog").dialog('close');
于 2013-11-12T17:58:09.233 回答