You are here: Reference > JavaScript > client-side > event handling > properties > view (event)

view property (event)

Browser support:
9
Returns a reference to the AbstractView object where the event occurred.
This object is the window object in which the event fired.

Syntax:

object.view;
You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Reference to the AbstractView object.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the view property:
<head>
    <script type="text/javascript">
        function GetAbsView (event) {
            alert (event.view);
        }
    </script>
</head>
<body>
    <button id="myButton" onclick="GetAbsView (event);">Get event view!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content