<%
if(...)
{
out.print("你的密码不正确!");
out.close();
}
else
{.....}
%>
<html>
<form>
......
.....
</form>
</html>
或者是
<%
if(...)
{.....}
else
{
%>
<html>
<form>
......
.....
</form>
</html>
<%
}
%>
if(...)
{
out.print("你的密码不正确!");
out.close();
}
else
{.....}
%>
<html>
<form>
......
.....
</form>
</html>
或者是
<%
if(...)
{.....}
else
{
%>
<html>
<form>
......
.....
</form>
</html>
<%
}
%>
if(...)
{
out.print("你的密码不正确!");
out.close();
}
else
{
......
%>
<html>
<form>
......
.....
</form>
</html>
<%
.....
}
%>
这样结构也比较清晰
只需要return一下就结束了