asp.net – $(“#dialog”).parent().appendTo($(“form:first
发布时间:2020-12-15 21:01:30 所属栏目:asp.Net 来源:网络整理
导读:我正在我的页面上打开几个jQuery对话框,我正在使用: $("#dialog2").parent().appendTo($("form:first")); //This was working,no problem. 我注意到,当我再次将它应用于dialog3时,它已经停止了该对话框的工作.如何将它用于不同的对话框? $("#dialog2").dia
我正在我的页面上打开几个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 – 当我将’启用32位应用程序’更改为False时,为什
- asp.net-mvc – IApplicationBuilder.New()的目的是什么?
- IdentityServer4 ASP.NET核心API Angular:登录/身份验证
- 使用xmlhttp的经典ASP页面可以发出JSON请求吗?
- 难道.NET Core到R2连中文编码都不支持吗?
- asp.net-mvc – ASP.NET MVC – 用于RenderPartial或Outsid
- asp.net-mvc – Sitecore PageEditor随机显示Glass.Mapper的
- 存储ASP.NET会话变量的最佳解决方案是什么? StateServer还
- asp.net – 为什么设置AssociatedUpdatePanelId时不会触发U
- asp.net-mvc – FileStreamResult和FilePathResult之间的区
推荐文章
站长推荐
- asp.net – 如何在Azure共享主机中启动Hangfire(
- asp.net使用AJAX实现无刷新分页
- asp.net – Visual Studio IIS Express不工作
- asp.net – 如何使用MVC 4和View Models(强类型)
- asp.net – 将ViewState移出页面?
- ASP.NET linkbutton两次提高onBeforeUnload事件
- asp.net – NullReferenceException在PipelineSt
- asp.net-mvc – 无法使用IIS Express在Windows 1
- 如何更正此ASP.NET错误
- ASP.NET Core 3.0 使用gRPC
热点阅读