'style' Example : style « Javascript Objects « JavaScript DHTML






'style' Example

    
<html>
<body>
<div id="myDiv" style="width:100; height:100;"></div>
<button onclick="myDiv.style.backgroundColor = 'blue';">Change color</button>
</body>
</html>

    
      
      








Related examples in the same category