How can submit form without submit button ?

We can submit a form by javascript using 2 ways following code:
1.document.formname.submit();
2.document.getElementById(formid).submit();

You can use both ways to submit a form but document.getElementById(formid).submit() is most effective because it always works but document.formname.submit() gives error some times , you will try to find out the mistake but you will not get anything.

So i prefer document.getElementById(formid).submit()

No related posts.

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>