在Opera中预先加载图像时禁用“加载...”模式

时间:2011-02-16 15:15:38

标签: image opera preloading image-preloader

跨域图像,加载 30 秒(其1x1 gif,但服务器在30秒后返回),通过图像预加载。

window.onload = function () {
    var img = new Image();
    img.onload = function () { alert('Yey!'); };
    img.onerror = function () { alert('Doh!'); };
    img.src = 'http://cross-domain.com/1x1px.gif';
};

除Opera之外的所有浏览器都不显示“正在加载...”模式。通过链接,脚本,iframe,CSS预加载图像 - 效果相同。

如何在Opera中预先加载图像时禁用“加载...”模式?

0 个答案:

没有答案