How do you submit a form with javascript with a <input type="button">
How wou开发者_运维百科ld you use a div to submit a form, for example? Javascript please
Like this:
document.getElementById("ID of form element").submit()
I have an onchange event attached to a dropdown that does:
this.form.submit();
It's used on an internal utility, so I'm not sure if there is a cross-browser issue, but it's great on IE 7, firefox 3.x, and safari.
精彩评论