asp.net – $(“#dialog”).parent().appendTo($(“form:first”));
发布时间:2020-09-02 05:11:30 所属栏目: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 – 在一个页面中以两种不同的形式使用多个@ Ht
- 如何在ASP.NET MVC中配置3个级别的URL?
- ASP.NET中TextBox使用Ajax控件显示日期不全的问题解决方法
- 有标签的ASP.NET WebControl吗?
- asp.net-mvc-3 – MVC3剃须刀:是否可以渲染传统的ASCX?
- asp.net – 我想列出我的下拉列表中的所有国家/地区,我在哪
- asp.net-mvc-3 – 使用@ Html.Raw有风险吗?
- ASP.NET:从C#代码隐藏显示警报
- 增加ASP.NET站点的executionTimeout和maxRequestLength是否
- 我可以使用ASP.NET成员身份实体框架吗?
推荐文章
站长推荐
- asp.net – 请求URL在IIS 7中无效
- asp.net-mvc – 为什么在视图引擎中指定位置时,v
- asp.net-mvc – ASP.Net MVC中的自我AJAX更新部分
- asp.net – 我可以愚弄HttpRequest.Current.Requ
- asp.net – visual studio 2017调试无法启动程序
- asp.net-ajax – Ajax脚本管理器和母版页
- asp.net – Visual Studio – 为什么.ASPX文件比
- asp.net-web-api – 首先使用ASP.NET Web API的E
- asp.net-mvc – ASP.NET MVC3中的随机会话超时
- asp.net – 干净的方式来防止输入按钮提交表单
热点阅读