asp.net – $(“#dialog”).parent().appendTo($(“form:first”));
发布时间:2020-09-02 05:04:59 所属栏目: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 – MVC3视图继承不可能?
- asp.net – 在Azure网站上启用gzip压缩
- asp.net-mvc – ASP.NET MVC会话超时,绝对还是滑动?
- asp.net-mvc – AntiXss保护Html模型属性
- 将ASP.NET应用程序本地化为普通话
- asp.net-mvc – 模型单元测试能否真正独立,如何[ASP.NET MV
- 在IIS / ASP.Net中的.NET 1.1应用程序中创建.NET 3.0子应用
- asp.net-mvc – 所有请求获取HTTP错误401.2 – 未经授权的响
- asp.net-mvc – 如何成功配置Common.Logging?
- asp.net – WebFormsMVP的缺点?
推荐文章
站长推荐
- asp.net-mvc – 具有ASP.NET MVC的多语言网站
- asp.net-mvc – ASP.NET MVC3中的随机会话超时
- asp.net – 我如何使用AJAX来确定用户的会话是否
- asp.net下使用jquery 的ajax+WebService+json 实
- asp.net – 如何从TableAdapter中检索存储过程返
- 如何合理地构建我的ASP.NET MVC 2项目与区域
- asp.net html控件的File控件实现多文件上传实例分
- 如何在ASP.NET Web应用程序中打开一个SectionGro
- asp.net-mvc – 文件上传MVC
- asp.net – 使用SignalR编译项目时,我必须做一个
热点阅读