MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 57063 of form.submit

  • Revision slug: Talk:Document_Object_Model_(DOM)/form.submit
  • Revision title: form.submit
  • Revision id: 57063
  • Created:
  • Creator: Hao2lian
  • Is current revision? No
  • Comment Answering question "* can "automatically" submit things this way without having to hit the submit button. ?But do you have to pass in the form parameters?"

Revision Content

"* can "automatically" submit things this way without having to hit the submit button. ?But do you have to pass in the form parameters?"

You don't have to pass the form parameters. submit() will just submit whatever is currently in the form fields. You have to fill in the form fields using the "value" property programatically using JavaScript if you want to control what's passed.

Revision Source

<dl><dd> "* can "automatically" submit things this way without having to hit the submit button. ?But do you have to pass in the form parameters?"
</dd></dl>
<p>You don't have to pass the form parameters. submit() will just submit whatever is currently in the form fields. You have to fill in the form fields using the "value" property programatically using JavaScript if you want to control what's passed.
</p>
Revert to this revision