Calling a Function from an Event Handler
<HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function showMsg(msg) { alert("The button sent: " + msg) } </SCRIPT> </HEAD> <BODY> <FORM> <INPUT TYPE="button" VALUE="Click Me" onClick="showMsg ('The button has been clicked!')"> </FORM> </BODY> </HTML>