js触发submit按钮

<script language="javascript">

 function formSubmit() {

   document.login.dosubmit.click();

 

 }

</script>

<table width="50%"  border="0" cellspacing="0" cellpadding="0">

  <form id="login" name="login" action="login.php" method="post">

   <tr>

      <td width="16%" align="center" valign="middle">

        <div align="right">

       <div style="display:none"><input type="submit" value=" " name="dosubmit" id="dosubmit" /></div>

         <!-- border='0'可以去掉图片的边框 -->

          <a href="#" onClick="formSubmit();"><img src="denglu.gif" border='0'></a> </div>

      </td>

    </tr>

  </form>

</table>

 

你可能感兴趣的:(JavaScript,function,action,div,border,login)