
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML view Event Property
The HTML view Event property returns a cite to the Window object where the event occured.
Syntax
Following is the syntax −
event.view
Example
Let us see an example of HTML view Event Property −
<!DOCTYPE html> <html> <style> body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; } .btn { background: #db133a; border: none; height: 2rem; border-radius: 2px; width: 40%; display: block; color: #fff; outline: none; cursor: pointer; margin: 1rem auto; } </style> <body> <h1>HTML view Event Property</h1> <button class="btn" onclick="get()">Show view event</button> <div class="show"></div> <script> function get() { document.querySelector(".show").innerHTML = "Open your console and observe the Window object"; console.log(event.view); } </script> </body> </html>
Output
Click on “Show view event” button to display Window object −
Now open your console to observe the Window object −
- Related Articles
- HTML returnValue Event Property
- HTML cancelable Event Property
- HTML currentTarget Event Property
- HTML defaultPrevented Event Property
- HTML isTrusted Event Property
- HTML DOM timeStamp Event Property
- HTML DOM Event type Property
- HTML DOM cancelable Event Property
- HTML ononline Event Attribute
- HTML onpageshow Event Attribute
- HTML ondragend Event Attribute
- HTML ondragenter Event Attribute
- HTML ondragleave Event Attribute
- HTML ondrop Event Attribute
- HTML ondragstart Event Attribute

Advertisements