Can anyone tell me what is going wrong with this code? I tried to submit a form with JavaScript, but an error \".submit is not a function\" shown. See below for more details
submit is not a function
means that you named your submit button or some other element submit. Rename the button to btnSubmit and your call will magically work.
submit
btnSubmit
When you name the button submit, you override the submit() function on the form.
submit()