正在加载图片...
Return to shopping</a> 2.3登录界面的设计 1)登录功能是常见的Web功能点,在很多Web应用中都有应用。一般的登录验证主要通 过用户名、密码两个属性来进行用户身份验证。进行用户身份验证的方法有很多,本次 实验采用最为简单的一种方式进行认证。 2)将下面的代码6.1保存为1 ogin. htm1作为登录页面(建议将本次实验的所有jsp文件保 存在同一目录下)。登录页面有三个表单项,分别是用来表示用户登录id的 username,登录 状态的 status,以及用来表示用户密码的 password Login.html源文件如下 <html> head> <title>login. html</title> /head> <body onload="javascript: document. fl username. focus();"> servlet/usercheck"method="post"> <table border="0 <tr> <td>Username: </td> <td<input type="text"name="username"id="username"></td> </tr> <tr> <td>Password: </td> <td><input type=password" name="password"id="password"> nput type=hidden" name="status" id=status" va1ue="1ogin"×</td> <tr> <td colspan="1 align="right"><input type="submit value="Login"></td> <td colspan=2 align="center ><input type="reset value="Reset"></td </tr> </table> /body </html><a href="<%= request.getContextPath() + SHOP_PAGE %>"> Return to Shopping</a> </td></tr></table></td></tr> </table> </body> </html> 2.3登录界面的设计 1) 登录功能是常见的Web 功能点,在很多Web 应用中都有应用。一般的登录验证主要通 过用户名、密码两个属性来进行用户身份验证。进行用户身份验证的方法有很多,本次 实验采用最为简单的一种方式进行认证。 2) 将下面的代码6.1 保存为login.html 作为登录页面(建议将本次实验的所有jsp 文件保 存在同一目录下)。登录页面有三个表单项,分别是用来表示用户登录id的username,登录 状态的status,以及用来表示用户密码的password。 Login.html源文件如下 <html> <head> <title>login.html</title> </head> <body onload="javascript:document.f1.username.focus();"> <form name="f1" id="f1" action="servlet/usercheck" method="post"> <table border="0"> <tr> <td>Username:</td> <td><input type="text" name="username" id="username"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password" id="password"> <input type="hidden" name="status" id="status" value="login"></td> </tr> <tr> <td colspan="1" align="right"><input type="submit" value="Login"></td> <td colspan="2" align="center"><input type="reset" value="Reset"></td> </tr> </table> </form> </body> </html>
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有