Execute a JavaScript when the browser window is resized:
The onresize attribute fires when the browser window is resized.
Event Attribute | |||||
---|---|---|---|---|---|
onresize | Yes | Yes | Yes | Yes | Yes |
The onresize attribute is new in HTML5.
Value | Description |
---|---|
script | The script to be run on onresize |
Supported HTML tags: | <body> |
---|
HTML DOM reference: onresize event