HTML DOM window event property
The window event property returns the event which is currently being handled by the site’s code in the current window.
event = window.event;
Note: This property has been DEPRECATED and is no longer recommended.
Return Value: This property returns the event object currently being handled.
Example: In this example, we will get the event type using this property.
Before Clicking Button:
After Clicking Button:
In Console, the event object is:
- Google Chrome
- Internet Explorer