日期:2014-05-17 浏览次数:20506 次
<!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> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/ui-darkness/jquery-ui.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js" type="text/javascript"></script> <style type="text/css"> div{margin:10px;} </style> </head> <body> <form id="form1" runat="server"> <div id="d1"> <asp:Button ID="Btn_Login" runat="server" Text="登录" onclick="Btn_Login_Click" /> </div> <div> <input id="pop" type="button" value="弹出登录层" /> </div> </form> <script type="text/javascript"> $("#pop").click(function () { $("#d1").dialog({ modal: true }); }); </script> </body> </html>
------解决方案--------------------
$('#dialog').parent().appendTo($("form:first"))
这种试试