此代码无法在Firefox中正常运行。在IE中完美运行 [英] This code couldn't run properly in firefox. In IE works perfectly

查看:66
本文介绍了此代码无法在Firefox中正常运行。在IE中完美运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<asp:ImageButton ID="imgbtn" Width="25px" Height="25px" ImageAlign="Right"runat="server" Visible="true" OnClick="log_Click"  OnClientClick="openWindow()" />













var newWindow = null;
        function openWindow() {

            if (newWindow != null)
                newWindow.close(); // for close opened window
            newWindow = window.open("demo.aspx?xxxx=" + "1200" + "&sada=", 'mywindow', 'height=750,width=1200, menubar=0, resizable=yes');
            //alert('close',20)
            newWindow.focus();
            newWindow.location.reload();
           }







开始弹出浏览器窗口确实有任何数据(只是空白)。如果我正在设置警告msg意味着我在弹出浏览器中有数据。




The opening popup browser window does have any data(simply blank). if i'm setting alert msg means i have data in popup browser.

推荐答案

不确定这是否是您的问题,但您是否注意到 Window.open() [ ^ ]:

Not sure if this is your problem but have you noticed from Window.open()[^]:
请注意远程URL不会立即加载。当window.open()返回时,窗口始终包含about:blank。 URL的实际提取是延迟的,并在当前脚本块完成执行后启动。窗口创建和引用资源的加载是异步完成的。
Note that remote URLs won't load immediately. When window.open() returns, the window always contains about:blank. The actual fetching of the URL is deferred and starts after the current script block finishes executing. The window creation and the loading of the referenced resource are done asynchronously.


这篇关于此代码无法在Firefox中正常运行。在IE中完美运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆