Javascript examples for DOM HTML Element:Div
Dynamically autosize DIV on resolution change
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from www. j av a2 s .co m var onResizeHandler = function() { // add your resize handling here console.log("resize"); } window.onresize = onResizeHandler; } </script> </head> <body> <p>Try to resize the browser window or zoom in or out and you will see a message in console</p> </body> </html>