本文介绍了在所有浏览器中打开模式弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 先生, 这里我想在所有浏览器中打开modalpopup。请帮助我。我使用的代码。请检查它。 代码: 设计页面: - 脚本使用: - function PrintItem(ID,BID){ window.showModalDialog(' ./ ProductSalesBill.aspx?Req = N& SID =' + ID + ' & BID = ' + BID,self,' dialogWidth:800px; dialogHeight:530px; status:no; dialogHide:yes ;缦:无;'); } 和我在上面调用的脚本是在gridview中: - < asp:TemplateField HeaderStyle-Width = 45px HeaderText = 打印 HeaderStyle-BorderColor = 灰色 > < ItemStyle Horizo​​ntalAlign = 中心 / > < ItemTemplate > <% - < a href = ' <%#DataBinder.Eval(Container,DataItem.Billno, javascript:PrintItem({0});)%>'> - %> < a href =' <%#String.Format( javascript:PrintItem({0},&#39; {1}&#39;),Eval( Billno),Eval( BranchCode))%> ' > < asp:Image runat = server ID = lnkprint alt = 打印 border = 0 src = App_Themes / DefaultTheme / Images / PrintIcon_btn .png / > < / a > 如何在所有浏览器中运行或以任何方式打开此窗口浏览器。解决方案 为此您可以添加bootstrap模式对话框,在项目中包含bootstrap库,并使用以下代码c打开模态弹出窗口。 ('#divSummary')。modal('show'); 和隐藏模型 (' #divSummary ')模态(' 隐藏); 也可用于隐藏模型,您可以在结算控件上使用以下属性 data-dismiss = 模态 hi sir, Here i want to open modalpopup in all browser .Kindly help me for that.Below code i used.Kindly check it.Code:in design page:-Script using:-function PrintItem(ID, BID) { window.showModalDialog('./ProductSalesBill.aspx?Req=N&SID=' + ID + '&BID=' + BID, self, 'dialogWidth:800px;dialogHeight:530px;status:no;dialogHide:yes;unadorned:no;'); }and i called above script is in gridview:-<asp:TemplateField HeaderStyle-Width="45px" HeaderText="Print" HeaderStyle-BorderColor="Gray"> <ItemStyle HorizontalAlign="Center" /> <ItemTemplate> <%--<a href='<%# DataBinder.Eval(Container, "DataItem.Billno", "javascript:PrintItem({0});") %>'>--%> <a href='<%#String.Format("javascript:PrintItem({0}, &#39;{1}&#39;)", Eval("Billno"), Eval("BranchCode")) %>'> <asp:Image runat="server" ID="lnkprint" alt="Print" border="0" src="App_Themes/DefaultTheme/Images/PrintIcon_btn.png" /> </a>how it work this all browser or any way to open this window in all browser . 解决方案 For this purpose you can add bootstrap modal dialog, Include bootstrap library in your project, and with following code you can open modal popup.('#divSummary').modal('show');and for hiding model('#divSummary').modal('hide');also for hiding model you can use following attribute on your closing controldata-dismiss="modal" 这篇关于在所有浏览器中打开模式弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-31 02:30