开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜