0 votes
in JavaScript by
How do you submit a form using JavaScript?

1 Answer

0 votes
by

You can submit a form using document.forms[0].submit(). All the form input's information is submitted using onsubmit event handler

function submit() {
  document.forms[0].submit();
}
...