HTML | view Event Property
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> |
chevron_right
filter_none
Output:

After clicking the button

Supported Web Browsers:
- Opera
- Internet Explorer
- Google Chrome
- Firefox
- Apple Safari
Recommended Posts:
- HTML | DOM cancelable Event Property
- HTML | returnValue Event Property
- HTML | DOM timeStamp Event Property
- HTML | DOM target Event Property
- HTML | currentTarget Event Property
- HTML | isTrusted Event Property
- HTML | bubbles Event Property
- HTML | defaultPrevented Event Property
- HTML | cancelable Event Property
- HTML | DOM type Event Property
- jQuery | event.namespace Property
- jQuery | event.currentTarget Property
- jQuery | event.data Property
- jQuery | event.delegateTarget Property
- HTML | DOM ondrop Event
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


