码迷,mamicode.com
首页 > 其他好文 > 详细

作业1

时间:2015-11-26 09:23:58      阅读:112      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!