Iam嘗試在jQuery模式對話框中打開一個彈出登錄窗體,單擊一個asp.net頁面上的按鈕。但模態對話框並不是彈出窗口。請告訴Iam做錯了什麼。asp.Net jquery模態對話框表
這裏是我的HTML代碼:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModalForm.aspx.cs" Inherits="ModalForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="js/jquery.js" type="text/javascript"></script>
<link href="css/jquery.modaldialog.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.modaldialog.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 300,
modal: true,
buttons: {
Cancel: function() {
$(this).dialog("close");
}
},
close: function() {
allFields.val("").removeClass("ui-state-error");
}
});
// Display the modal dialog.
$("#btndialog").click(function() {
$("#dialog").dialog("open");
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="dialog" title="Please Login">
<asp:Login ID="LoginForm" runat="server" />
</div>
<asp:Button ID="btndialog" runat="server" Text="Click" />
</form>
</body>
</html>
感謝
是模型對話框完全不顯示或者說,它不顯示爲模型窗口的問題,但作爲內聯內容? – Tnem 2011-04-09 12:51:31