Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML | DOM Window stop() Method

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The stop() method in DOM is used to stop the window from loading resources in the current browsing context, similar to the browser’s stop button. 

Syntax:

window.stop()

Example: Stop window from loading. 

html




<!DOCTYPE html>
 
<html>
 
<head>
    <title>
        HTML | DOM Window stop() Method
    </title>
 
</head>
<style>
    h1 {
        color: green;
    }
</style>
 
<head>
    <script>
        // Stop window loading.
        window.stop();
    </script>
</head>
 
<body>
    <h1>GeeksforGeeks</h1>
    <p>
      The stop() method stops this
      text and the iframe from loading.
    </p>
 
    <iframe src=
    </iframe>
 
</body>
 
</html>

Output: Without window.stop() method:  

With window.stop() method:  

Supported Browsers: The browser supported by DOM Window stop() Method are listed below:

  • Google Chrome 1
  • Edge 14
  • Firefox 1
  • Opera 12.1
  • Safari 3
My Personal Notes arrow_drop_up
Last Updated : 04 Aug, 2022
Like Article
Save Article
Similar Reads
Related Tutorials