Open In App

HTML | view Event Property

Improve
Improve
Like Article
Like
Save
Share
Report

The view Event Property is used for returning a reference to the Window object. When an event occurs it returns the reference of the Window Object.

Syntax :

event.view

Return Value: Returns a reference to the Window object.

Below program illustrates the view Event Property:




<!DOCTYPE html>
<html>
  
<head>
    <title>view Event Property in HTML</title>
    <style>
        h1 {
            color: green;
        }
          
        h2 {
            font-family: Impact;
        }
          
        body {
            text-align: center;
        }
    </style>
</head>
  
<body>
  
    <h1>GeeksforGeeks</h1>
    <h2>view Event Property</h2>
  
    <p>For returning a reference to the Window object,
      double click the "Return Reference" button: </p>
  
    <button ondblclick="myevent(event)">Return Reference</button>
    <br>
  
    <p id="test"></p>
  
    <script>
        function myevent() {
            var e = event.view;
            document.getElementById("test").innerHTML = e;
        }
    </script>
  
</body>
  
</html>
               


Output:

After clicking the button

Supported Web Browsers:

  • Opera
  • Internet Explorer
  • Google Chrome
  • Firefox
  • Apple Safari


Last Updated : 17 Jan, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads