<html> <head> <script language="JavaScript"> function function1() { document.all.myBody.text = "blue"; } </script> </head> <body id="myBody"> Some text <input type="button" value="Change to blue" onClick="function1();"> </body> </html>