怎么响应input按钮单击事件?刚用JSP,马上就要求做项目
马上就要求上手做项目,大家帮忙吧
...
<input type="text" name="username" style="width:150px;height:21px;border:solid 1px black">
...
<input type="password" name="psw" style="width:150px;height:21px;border:solid 1px black">
...
<input name=submit2 type="image" value="mysubmit" src="images/login_button.jpg" align="middle">
...
<%
String user=request.getParameter("username");
if (user==null)
{
out.print ("用户名不能为空")
}
String psw=request.getParameter("psw");
if (psw==null)
{
out.print ("密码不能为空")
}
%>
...
像上面那样写不能响应啊