+ -
当前位置:首页 → 问答吧 → js 触发onclick

js 触发onclick

时间:2011-10-22

来源:互联网

源代码:

<td width="45%" height="40" align="center">
<input type="button" value="登录" style="cursor:hand;" onclick="checkForm2();" />
&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重填" />
&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="注册" onclick="reg()" /></td>
  </tr>
  <tr>


用这句可是没有ID 请教各位js 触发onclick 也就是触发 登录 按钮

document.getElementById('').click()

作者: toemss   发布时间: 2011-10-22

JScript code
那你就加一个ID.
document.getElementById('ID').click();

作者: jayrao5566   发布时间: 2011-10-22

直接执行下checkForm2()这个函数不就行了?

作者: MuBeiBei   发布时间: 2011-10-22