Javascript examples for DOM Event:onresize
The onresize event occurs when the browser window has been resized.
Bubbles | No |
---|---|
Cancelable | No |
Supported HTML tags: | <body> |
<!DOCTYPE html> <html> <body onresize="myFunction()"> <p>Window resized <span id="demo">0</span> times.</p> <script> var x = 0;/*w ww. j av a 2s.c o m*/ function myFunction() { var txt = x += 1; document.getElementById("demo").innerHTML = txt; } </script> </body> </html>