Presenting Different Content for Scriptable and Nonscriptable Browsers
<html> <head> <title></title> <script type="text/javascript" language="JavaScript"> function updatePage() { if (document.getElementById) { document.getElementById("mainLink").href = "http://www.java2s.com"; document.getElementById("welcome").innerHTML = "value for inner html"; } } window.onload = updatePage; </script> </head> <body> <a id="mainLink" href="http://www.java2s.com">Where?</a> </body> </html>