Posted inAll / Javascript

Submit a form without submit button


document.formname.submit(); //It will work when we are using single form in a page

document.forms['formname'].submit(); //It will work when we are using multiple forms

// above formname is our formname

Example:
--------
<form name="frmLogin" id="frmLogin"></form>
document.forms['frmLogin'].submit();
(OR)
document.frmLogin.submit();

 

 

 

Leave a Reply