Posted on 2007-01-07 16:57 
兵临城下 阅读(1133) 
评论(5)  编辑  收藏  所属分类: 
JavaScript 
			 
			
		 
		有这样一段Html:
    <html:form action="/Logon.do" method="POST">
      <table border="0">
        <tr>
          <td>UserName:</td>
          <td><html:text property="userName" /></td>
        </tr>
        <tr>
          <td>Password:</td>
          <td><html:password property="userPws" /></td>
        </tr>
        <tr>
          <td><html:button property="submit" value="submit" onclick="test()" /></td>
          <td><html:cancel /></td>
        </tr>
      </table>
    </html:form>
submit的js方法如下:
 <script language = "javascript">
  function test() {
    document.forms[0].submit();
  }
 </script>
为什么总是提交不了呢?提示对象不支持此属性和方法。