event.width

JavaScript 1.2+ Nav4+ Syntax

							event.width

Description

The width property of the Event object refers to the width of a window or frame. It is set during the RESIZE event to the new width of window or frame being resized.

Example

Listing 7.216 shows an example using the width property. The RESIZE event is captured and passed to the handle() function. This function informs the user that a RESIZE event has occurred and outputs the new width of the window.

Listing 7.216 Accessing the width Property
 <html> <head> <title>Example of the event.width property</title> </head> <body> <script language = "JavaScript"> <!--Hide // sets up the window to capture RESIZE events window.captureEvents(Event.RESIZE); // function that changes the ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.