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
If you have no opportunity to change name="submit" you can also submit form this way:
name="submit"
function submitForm(form) { const submitFormFunction = Object.getPrototypeOf(form).submit; submitFormFunction.call(form); }