ExampleExecute a JavaScript when the browser window is resized: |
Browser SupportNote: The onresize event attribute is supported in all major browsers. |
1. Definition and Usage
The onresize attribute fires when an object is resized.
The onresize attribute is most often used when the browser window is resized.
2. Differences Between HTML 4.01 and HTML5
None.
3. Syntax
<element onresize="script">
4. Attribute Values
Value | Description |
---|---|
script | The script to be run on onresize |