<html> <head> <title>A Simple Page</title> <script language="JavaScript"> function firstMessage(){ alert("A"); secondMessage(); alert("B"); } function secondMessage() { alert("another function"); } </script> </head> <body onLoad="firstMessage()"> </body> </html>