change title with javascript
.. <title>original title</title> .. <script type="text/javascript"> function changeTitle(title) { document.title = title; } </script> .. <input type='button' onclick='changeTitle("new title")' value='Change Title'/> ..
DZone Snippets > ovhaag > dom
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
.. <title>original title</title> .. <script type="text/javascript"> function changeTitle(title) { document.title = title; } </script> .. <input type='button' onclick='changeTitle("new title")' value='Change Title'/> ..
<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'/>