struts中使用onclick事件为什么是无效的
咚咚小可 2008-03-05 10:48:40 我在先在<html:submit>标签中使用onClick事件可是报错了,说我的onClick是无效的,之后换到了<html:form>中也是一样的
代码:
<html:form method="post" action="/leave" onClick="textlength()">
<table width="700px" align="center">
<tr>
<td width="25%" align="center">用户名</td>
<td width="45%">
<html:text property="username" />
</td>
</tr>
<tr>
<td align="center" width="100%" colspan="3">
<html:submit value="留言"/>
</td>
</tr>
</table>
</html:form>
错误信息:
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /index.jsp(20,2) Attribute onClick invalid for tag form according to TLD
那位大虾请指教一下