HTML:
<div id="dialog" title="Basic dialog">
<p>Hello.</p>
</div>
<a href="www.google.com">Link</a>
JavaScript
$(document).ready(function() {
$( "#dialog" ).dialog({ autoOpen: false });
$(document.body).on('click',"a",function(event){
event.preventDefault();
$("#dialog").dialog('open');
});
});
当我点击关闭按钮时,我无法关闭对话框。为什么?