How to stop page load in html static page

后端 未结 11 1441
庸人自扰
庸人自扰 2020-11-30 02:35

Is there in HTML (javascript) or other static html tech can:

  • Stop page loading (if browser does not download yet)
  • Stop page rendering (from where the
11条回答
  •  庸人自扰
    2020-11-30 03:04

    window.stop(); //works in all browsers but IE    
    if ($.browser.msie) {document.execCommand("Stop");}; //works in IE, 
    

    document.execCommand works in IE, however it does stop some of FF, NS and some other browsers' functions. Like displaying GIF's animation for example. Using "if browser is IE" makes these two codes work perfectly in all browsers.

提交回复
热议问题