Javascript examples for DOM HTML Element:Div
Set Div height and width via style height attribute
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from ww w .j a v a 2s . com*/ var d = document.getElementById("d1"); d.style.height = "200px"; }); </script> </head> <body> <div id="d1" style="border:1px solid black;"> asdasd </div> </body> </html>