正在学JS这书上的一段代码但是确是错的求大神们看看帮帮忙,小弟谢谢了!

 <% @ page contentType="text/html;charset=GB2312" %>
<HTML><BODY bgcolor=cyan><FONT Size=3>
<p>请输入E-mail<BR>
<FORM action=""method=get name=form>
<INPUT type="text" name="client" value="请输入E-mail">
<INPUT TYPE="submit" value="送出" name="submit">
    </FORM>
    <% 
    String str=request.getParameter("client");
    if(str!=null){
    int index=str.indexOf("@");
    if(index==-1){

 %><BR>你的E-mail地址没有@
<%  }
else{
int space=str.indexOf("");
if(space!=-1){
%> <BR>你的E-mail含有非法空格
<%  }
else{
  int start=str.indexOf("@");
  int end=str.lastIndexOf("@");
  if(start!=end){
%>  <BR>你的E-mail地址有两个以上符号:@。
 <%  }
     else{
         out.print("<BR>"+str);
         %> <BR>你的E-mail地址书写正确。
     <% }
}
}
    }

    %>
    </FONT></BODY></HTNL>

int space=str.indexOf(""); 这个是什么鬼

int space=str.indexOf(" "); 空格要打出来

 if(start!=end){
%>  <BR>你的E-mail地址有两个以上符号:@。
 <%  }
     else{
         out.print("<BR>"+str);
         %> <BR>你的E-mail地址书写正确。
     <% }

这里第一个的不等号打错啦,要英文格式的. !