首页 > 其他 > 详细

作业1

时间:2015-11-26 09:21:51      阅读:340      评论:0      收藏:0      [点我收藏+]

登录

<form action="panduan.jsp">

用 户  ID : <input name="id" type="text" width="30"/>

<br><br>

用户密码: <input name="mima" type="password" width="30"/>

<br>

<input type="submit" value="登录">

</form>

 

 

判断

<%

String id = new String(request.getParameter("id"));

String mima = new String(request.getParameter("mima"));

String S1 = "11";

String S2 = "11";

if(id.equals(S1) && mima.equals(S2))

  {out.print("登陆成功");}

else

{ response.sendRedirect("error.jsp"); }

%>

 

 

error

 

</head>

<%

response.setHeader("refresh","3;URL=denglu.jsp");

%>

</head>

<body>

账号或密码错误!

</body>

 

作业1

原文:http://www.cnblogs.com/chenning/p/4996532.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!