<HTML> <HEAD> <TITLE>Example of Writing Form Elements</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function checkText(){ if( document.FormExample3.textbox.value == "AAA"){ alert("You are correct!"); } else { document.FormExample3.textbox.value = "AAA"; alert("That is incorrect. The correct answer is now in the text box."); } } // End hide--> </SCRIPT> </HEAD> <BODY> <FORM NAME="FormExample3" METHOD=POST> Input <INPUT TYPE="text" NAME="textbox" SIZE=25> <INPUT TYPE="BUTTON" NAME="Bugs" VALUE="Submit" onClick="checkText(this.form)"> </FORM> </BODY> </HTML>