asp.net – $(“#dialog”).parent().appendTo($(“form:first”));
发布时间:2020-09-02 05:05:34 所属栏目:asp.Net 来源:互联网
导读:我正在我的页面上打开几个jQuery对话框,我正在使用: $(#dialog2).parent().appendTo($(form:first)); //This was working, no problem. 我注意到,当我再次将它应用于dialog3时,它已经停止了该对话框的工作.如何将它用于不同的对话框? $(#dialog2).dialog({
我正在我的页面上打开几个jQuery对话框,我正在使用: $("#dialog2").parent().appendTo($("form:first")); //This was working,no problem. 我注意到,当我再次将它应用于dialog3时,它已经停止了该对话框的工作.如何将它用于不同的对话框? $("#dialog2").dialog({ bgiframe: false,autoOpen: false,height: 410,width: 800,modal: true,draggable: true,resizable: true }); $("#dialog2").parent().appendTo($("form:first")); //doesn't work now $("#dialog3").dialog({ bgiframe: false,width: 600,resizable: true }); $("#dialog3").parent().appendTo($("form:first")); HTML: <div id="dialog3" title="Attachments"> <p id="P1"> <asp:Button ID="btnAttach" runat="server" Text="Attach files" class="float-left ui-button"/></p> <fieldset> </fieldset> </div> <div id="dialog2" title="Notes"> <asp:Image ID="Image1" runat="server" ImageUrl="~/images/icons/user_comment.png" /> <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger" Text="Notes"></asp:Label> <br /> <div style="overflow: auto; height: 310px; width: 780px;"> <fieldset> <br /> <asp:TextBox ID="txtNote" runat="server" CssClass="notetext" Width="740px" Rows="6" TextMode="MultiLine" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" /> <br /> <div style="width: 743px"> <asp:Button ID="btnNoteSave" runat="server" Text="Save" class="float-right ui-button" /> </div> </fieldset> </div> 解决方法更好的一个 –$('#dialog2').dialog({ open:function(){{ $(this).parent().appendTo($("form:first")); }} }); $('#dialog3').dialog({ open:function(){{ $(this).parent().appendTo($("form:first")); }} }); (编辑:甘南站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc-3 – Url.Action没有给出预期的结果.不需要的路
- asp.net-mvc – Ajax重定向到页面而不是更新目标
- asp.net – 确定当前页面是否需要授权?
- asp.net-mvc – ASP .Net MVC 3:子动作和重定向
- asp.net-mvc – ASP.NET MVC查看引擎解析顺序
- asp.net-mvc-4 – 最小和最大字符串长度的单独错误消息 –
- asp.net-mvc – Umbraco 7自定义cookie
- 修改服务器配置 让asp.net文件后缀名随心所欲
- asp.net – 防止XSS(跨站脚本)
- asp.net-mvc – 在asp.net mvc中启动一组未选中的radiobutt
推荐文章
站长推荐
- 是否可以通过IIS从ASP.NET Core强制返回Connecti
- asp.net-mvc-3 – 如何关闭我的整个ASP.NET MVC
- asp.net-mvc – ControllerActionInvoker
- asp.net-mvc – AntiXss保护Html模型属性
- ASP.Net 2中的上传文件在哪里?
- ASP.NET:从C#代码隐藏显示警报
- asp.net-web-api – Web API / MVC 6中的安全JSO
- asp.net – Web Forms MVP项目有哪些好的资源?
- ASP.NET设计网络硬盘之删除文件夹实现代码
- asp.net-mvc – 我需要有关HandleError的更多信息
热点阅读