开发者

How to refresh page with image showing when refreshing.. This doesn't work in IE :(

开发者 https://www.devze.com 2023-02-11 14:21 出处:网络
I have tried the below in Firefox and it works, but it doesn\'t in IE 7 and 8 -- the page refreshes but I don\'t get to see the image when refreshing in IE.

I have tried the below in Firefox and it works, but it doesn't in IE 7 and 8 -- the page refreshes but I don't get to see the image when refreshing in IE. Thanks in advance.

Javascript:

window.onload = show;
function show() {
  document.getElementById("img444").style.display="none";
  setTimeout("hide()", 5000);  // 5 seconds
}

function hide() {
  document.getElementById("img444").style.display="block";
  window.location.reloa开发者_开发知识库d(false);
}

HTML:

<img id="img444" src="images/indicator.gif" style="display: none;"/>


Well i changed the code as per @gov's comment and it does work on IE7 and firefox.

So it should also work for you

0

精彩评论

暂无评论...
验证码 换一张
取 消