SyntaxFix
Write A Post
Hire A Developer
Questions
If your form does not have any id, but it has a class name like theForm, you can use the below statement to submit it:
document.getElementsByClassName("theForm")[0].submit();