主题:高手们帮我看一下错在哪?谢谢
这段代码,登陆名和密码为空也可以读到if(aa!null)真的不份
为社么啊?
----------------------------------------------------------
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>jsp1</title>
</head>
<body bgcolor="#ffffff">
<%
String aa=request.getParameter("aa");
String bb=request.getParameter("bb");
if(aa!=null)
{%>
Hello,<%=request.getParameter("aa")%> <br>
welcome.<%=bb%>
<%}
else
{%>
<form action="jsp1.jsp" method="GET">
登陆名: <input type="text" name="aa" maxlength="20" size="15"/><br>
密码: <input type="password" name="bb" maxlength="20size="15"/><br>
<input type="submit"/>
</form>
<%
}
%>
</body>
</html>
为社么啊?
----------------------------------------------------------
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>jsp1</title>
</head>
<body bgcolor="#ffffff">
<%
String aa=request.getParameter("aa");
String bb=request.getParameter("bb");
if(aa!=null)
{%>
Hello,<%=request.getParameter("aa")%> <br>
welcome.<%=bb%>
<%}
else
{%>
<form action="jsp1.jsp" method="GET">
登陆名: <input type="text" name="aa" maxlength="20" size="15"/><br>
密码: <input type="password" name="bb" maxlength="20size="15"/><br>
<input type="submit"/>
</form>
<%
}
%>
</body>
</html>