This is originally from Web Teacher - go here and click the "Let's break it down" link for a more detailed 'breakdown'.



Back to examples

<HTML>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -

function MsgBox (textstring) {
alert (textstring) }

// - End of JavaScript - -->
</SCRIPT>

</HEAD>


<BODY>

<FORM>
<INPUT NAME="text1" TYPE=Text>
<INPUT NAME="submit" TYPE=Button VALUE="Show Me" onClick="MsgBox(form.text1.value)">
</FORM>

</BODY>
</HTML>