Javascript examples for CSS Style Property:height
Change element width and height via CSS style
<!doctype html> <html> <head></head> <body> <div id="box"> Hello! //from w ww . j a va 2s . c om </div> <script> (function changeSize() { document.getElementById('box').setAttribute("style","display:block;width:300px;background-color:blue;"); document.getElementById('box').style.width='300px'; })() </script> </body> </html>