我正在使用这样的 jQuery 模态确认:
$(function() {
$( "#dialog-confirm" ).dialog({
resizable: false,
height:190,
width: 330,
modal: true,
buttons: {
"Yes": function() {
$( this ).dialog( "close" );
},
No: function() {
$( this ).dialog( "close" );
}
}
});
});
<div id="dialog-confirm" title="Genalytics">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>Are you sure want to unshare?</p>
</div>
我有一个这样的输入按钮:
<input type="submit" value="Unshare" name="unshare" />
当用户单击按钮时,我想弹出对话框。我怎样才能做到这一点?