<html> <body onLoad="function1();"> <script> function function1() { document.body.aLink = "red"; } </script> <a href="http://www.java2java.com/">java2s.com (click to turn red)</a> </body> </html>