Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body onresize="myFunction()"> <p>Assign an "onresize" event to a body element.</p> <p>Try to resize the browser window.</p> <p>Window resized <span id="demo">0</span> times.</p> <script> var x = 0; function myFunction() { var txt = x += 1; document.getElementById("demo").innerHTML = txt; } </script> </body> </html>