日期:2014-05-18  浏览次数:20720 次

用javascript验证信息时出现了这个错误
我想用javascript验证提交的username和userpassword信息,但是编译时出现
org.apache.jasper.JasperException:   /reg.jsp(29,1)   Attribute   name   invalid   for   tag   form   according   to   TLD
我想是不是 <html:form   method= "post "   name= "reg "   language= "javascript "   action= "/reg "   onsubmit= "return   Check(); "> 这里写错了,或者还有其他的错误,请各位大虾指点一下小弟,谢谢


<%@   page   language= "java "%>
<%@   page   contentType= "text/html;   charset=gb2312 "%>

<%@   taglib   uri= "http://struts.apache.org/tags-bean "   prefix= "bean "%>
<%@   taglib   uri= "http://struts.apache.org/tags-html "   prefix= "html "%>
<%@   taglib   uri= "http://struts.apache.org/tags-logic "   prefix= "logic "%>
<%@   taglib   uri= "http://struts.apache.org/tags-tiles "   prefix= "tiles "%>


<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN ">
<html:html   lang= "true ">
<head>
<html:base   />

<title> reg.jsp </title>

<meta   http-equiv= "pragma "   content= "no-cache ">
<meta   http-equiv= "cache-control "   content= "no-cache ">
<meta   http-equiv= "expires "   content= "0 ">
<meta   http-equiv= "keywords "   content= "keyword1,keyword2,keyword3 ">
<meta   http-equiv= "description "   content= "This   is   my   page ">
<!--
<link   rel= "stylesheet "   type= "text/css "   href= "styles.css ">
-->

</head>

<body>
<html:form   method= "post "   name= "reg "   language= "javascript "   action= "/reg "
onsubmit= "return   Check(); ">
<table   valign= "center ">
<tr>
<td>
用户名
</td>
<td>
<html:text   property= "username "   />
</td>
</tr>
<tr>
<td>
密码
</td>
<td>
<html:password   property= "userpassword "   />
</td>
</tr>
<tr>
<td>
性别
</td>
<td>
<html:radio   property= "sex "   value= "男 "> 男 </html:radio>
<html:radio   property= "sex "   value= "女 "> 女 </html:radio>
</td>
</tr>
<tr>
<td>
学历
</td>
<td>
<html:select   property= "education ">
<html:option   value= " "> </html:option>
<html:option   value= "高中 "> 高中 </html:option>
<html:option   value= &qu