onreadystatechange在ff和safari中不起作

onreadystatechange在ff和safari中不起作

本文介绍了onreadystatechange在ff和safari中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用此代码在iframe中显示加载图片.使用此代码,我只是隐藏iframe并显示在加载时具有加载图像的div及其在IE中的正常工作,但在ff和safari中不起作用! :confused :: confused:

Hi,

I am using this code for displaying loading image in iframe. Using this code I am just hiding iframe and displaying div having loading image at the load time and its work fine in ie but not working in ff and safari! :confused::confused:

document.getElementById('frameID').onreadystatechange = loadImage;
function loadImage()
{
  if(document.getElementById('frameID').readyState != 'complete')
  {
    $("#imageDiv").removeClass('loadingImage').addClass('frameDivLoading');
    document.getElementById("frameID").style.display = "none";
  }
  else
  {
    $("#imageDiv").removeClass('frameDivLoading').addClass('loadingImage');
    document.getElementById("frameID").style.display  = "block";
  }
}


有什么解决办法吗?
谢谢:):)


Do you have any solution?
Thanks :) :)

推荐答案



有什么解决办法吗?
谢谢:):)


Do you have any solution?
Thanks :) :)



这篇关于onreadystatechange在ff和safari中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 08:20