change text
<script type="text/javascript"> function changeText(txt){ document.getElementById('the_text').innerHTML = txt; } </script> <p>Hello <b id='name'>World</b>. </p> <input type='button' onclick='changeText("Oliver")' value='Change Text'/>
DZone Snippets > ovhaag > text
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Oliver Haag www.ohcon.de
<script type="text/javascript"> function changeText(txt){ document.getElementById('the_text').innerHTML = txt; } </script> <p>Hello <b id='name'>World</b>. </p> <input type='button' onclick='changeText("Oliver")' value='Change Text'/>