submit() Method

FORM1:

 

FORM2:

<FORM NAME="FORM1">
     <INPUT
TYPE="text">
    
<INPUT TYPE="submit">
     <INPUT
TYPE="button" VALUE="Press Me" onClick="this.form.submit();">
</FORM>

<FORM NAME="FORM2">
     <INPUT
TYPE="text" NAME="Name">
    
<INPUT TYPE="submit">
     <INPUT
TYPE="button" VALUE="Press Me" onClick="this.form.submit();">
</FORM>

Some of things to notice with these 2 FORMS:

  • The Submit button & the Press Me button both do the same thing - submit the form's "results" to the FORM's ACTION.
  • What happens in the Address/Location Area of the browser when you submit a form?
    FORM1 => URL?
    FORM2 => URL?Name=
  • In FORM1 the text field has no name. If you put a value in FORM1's text field and then Submit the form what happens?
    URL?
  • In FORM2 the text field has a name. If you put a value in FORM2's text field and then Submit the form what happens?
    URL?Name=Value