我正在使用 UI 对话框,是否有样式或名称或任何我可以给取消按钮以使其默认关闭对话框的内容?这是我当前的按钮
<input type="button" value="Cancel" name="close" id="btncancel" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" />
谢谢
编辑:这是我当前的对话框代码和尝试的事件
$(".editDialog").on("click", function (e) {
var url = $(this).attr('href');
$("#dialog-edit").dialog({
title: 'Edit',
autoOpen: false,
resizable: true,
autoResize:true,
minHeight: 'auto',
width: width,
modal: true,
draggable: true,
open: function (event, ui) {
//Show the loading div on open.
$("#dvLoading").show();
//adding a callback function wich will be launched after the loading
$(this).load(url,function(response, status, xhr) {
if (status == "error") {
var msg = "Sorry but there was an error: ";
$(this).html(msg + xhr.status + " " + xhr.statusText);
} else $("#dvLoading").hide();
});
},
close: function (event, ui) {
$(this).dialog('close');
},
buttons: {
"Cancel": function () {
$(this).dialog("close");
}
}
});
$("#dialog-edit").dialog('open');
return false;
});