How To Submit A Form With JavaScript By Clicking A Link
Here we consider how to Submit A Form With JavaScript By Clicking A Link.
Lets start with one example here.
Suppose we have a link as shown below.

When we click on this link, the form needs to be submitted.
Here we first find the element by its ID.
And then to this element, click event is attached.
Inside Click event, the form will be Submitted.
var form = document.getElementById("form1");
var link = document.getElementById("linkID");
link.addEventListener("click", function () {
form.submit();
});
That's all, by this way we can Submit A Form With JavaScript By Clicking A Link.