Unless you code your web pages in vanilla javascript, you’ll probably not notice this but when you do it’ll quite baffle you that the event listener you attach to a form’s submit event using addEventListener
or onSubmit
will not be invoked when you submit the form directly like this – form.submit()
.
Continue reading “JavaScript Fire onSubmit Event Handler Programmatically by Calling form.submit()”