• [织梦吧]唯一域名:www.dedecms8.com,织梦DedeCMS学习平台.

当前位置: > 编程与数据库 > Jsp编程 >

JSP实现验证码

来源: www.dedecms8.com 编辑:织梦吧 时间:2012-06-28点击:

  

验证码的实现分为JSP页面和Java类Servlet两部分:

JSP页面:

<!DOCTYPE html>

<html>

  <head>

    <title>loginForm.html</title>

 

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">

    <meta http-equiv="description" content="this is my page">

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

   

    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  </head>

 

  <body>

  <h3>带有验证码的登陆页面</h3>

  <form method="post" action="login.yan" >

    用户名:<input type="text" name="usreName" size="10"><br><br/>

    密&nbsp;&nbsp;&nbsp;码:<input type="password" name="password" size="10"><br><br>

    验证码:<input type="text" name="userNum" size="4"><img src="loginForm"/><br/><br/>

    <input type="submit" value="提交">

  </form>

  </body>

</html>

 

Java类:

标签: jsp

About D8

  • ©2014 织梦吧(d8) DedeCMS学习交流平台
  • 唯一网址 www.DedeCMS8.com 网站地图
  • 联系我们 1170734538@qq.com ,  QQ