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 });
}
);
What is worth noting is the appendTo: "form" option. By default, JqueryUI Dialog will add the
that represents the dialog box. Add it to the Body so that when the form is submitted, the server cannot obtain the values related to the server controls in the dialog box.
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn