Home > Article > Web Front-end > jquery ui dialog example code_jquery
The dialog box currently provided by JqueryUI supports the convenience of using relative comparisons. The sample code is as follows:
$(function () {
$("#dlg").dialog({
autoOpen: false,
closed: true,
width: 450,
modal: true,
appendTo: "form",
buttons: {
"OK": function () {
$("form").submit();
},
"Cancle": function () {
$(this).dialog("close");
}
},
close: function () {
}
});
$("#<%=Showdlg.ClientID%>").button().click(function() { $("#dlg").dialog("open"); return false });
}
);