Javascript examples for DOM:Element innerHTML
Set innerHTML to text value
<html> <head> <title>innerHTML test</title> <script> function doIt(){/*from w w w . j av a 2s. c o m*/ document.getElementById("header-text").innerHTML = "something interesting"; } </script> </head> <body> <div id="header-text" class="picture-text"> Static text </div> <input type="button" value="Change It" onclick="doIt();"> <br> </body> </html>