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