【问题标题】:chrome not displaying images in dynamically created new windowchrome不在动态创建的新窗口中显示图像
【发布时间】:2013-11-07 18:27:29
【问题描述】:

我正在使用 javascript 创建一个新窗口并显示服务器上存在的图像。该窗口可以正常打开并在 Firefox 上显示图像,但在 Chrome 上不显示。有什么问题?

function wopen(){
nwin = window.open('','_blank','directories=no,height=600,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,width=800,top=10,left=60');
nwin.document.open();
var msg = "<html><head><title>Test page</title></head><body><img src='http://www.mywebsite.com/images/logo.jpg' border='0' height='20' width='20'></body></html>"
nwin.document.write(msg);
nwin.document.close();
}

当我调用此函数时,窗口打开,但图像未以 chrome 显示,但在 Firefox 中正确显示。这里有什么问题?

【问题讨论】:

  • 可能是因为msg中没有结束

标签: javascript google-chrome window


【解决方案1】:

在我更改了我的虚拟主机服务器中的设置后,这个问题得到了解决;我所做的只是取消了之前处于活动状态的图片盗链。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多