Assignment 5 Answer

Here's one way of doing it...


Name:
Which do you like: Chocolate      Vanilla

And here's the code that did it:

<FORM action="">

Name: <INPUT TYPE="text" SIZE="30" 
  onFocus="window.status='Put your name in here';">
Which do you like: 
<INPUT TYPE="checkbox" 
  onClick="window.status='You chose chocolate';"> 
  	Chocolate
<INPUT TYPE="checkbox"  
  onClick="window.status='You chose vanilla';"> 
  	Vanilla

<INPUT TYPE="submit" 
  onClick="alert('Thanks for filling out the form');">


</FORM>

Close this window to return to JavaScript Primer