NOTE: NEVER call anything in a form "submit"! It will hide the form's submit event from script.
You have many ways of accessing the button
document.querySelector("[name=submit]").click(); // first named button
document.querySelector("#form [name=submit]").click(); // in form with id="form"
Old IEs would shadow the name so you could use getElementById on a name but it is not recommended.
Older methods:
document.getElementsByName("submit")[0].click();
where 0 is the first element on the page named submit.
document.forms[0].elements[0].click();
where forms[0] is the first form and elements[0] is the first element
or
document.getElementsByTagName("form")[0].elements[0].click();
where ("form")[0] is the first form on the page and elements[0] is the first element