登陆页中将用户设为guest默认用户的设置
function loginSubmit(){ var frmLogin = document.frmLogin; if(frmLogin.userId.value == "") { alert("请输入用户名"); frmLogin.userId.select(); frmLogin.userId.focus(); return; } if(frmLogin.password.value == "") { alert("请输入用户口令"); frmLogin.password.select(); frmLogin.password.focus(); return; } frmLogin.submit(); } <%@ page language="java" import="java.util.*" contentType="text/html; charset=GBK" %> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=GBK"> <title>东方灵盾专利信息检索平台登陆界面!</title> <style type="text/css"> <!-- body { background-image: url(images/bg.gif); } --> </style> <link href="css/styles.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="js/login.js"></script> </head> <body tracingsrc="images/index.gif" tracingopacity="40"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%" height="91"> </td> </tr> <tr> <td height="98"> <table width="471" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="199"> </td> <td width="272"> <img src="images/logo.gif" width="228" height="82"> </td> </tr> </table> </td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/tablebg.gif"> <tr> <td height="438" valign="top"> <table width="710" height="231" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="290" height="231"> </td> <td width="420" align="center" valign="top" background="images/inputbg.gif"> <table width="68%" border="0" cellspacing="0" cellpadding="0"> <form name="frmLogin" action="login.do" method=post> <tr> <td height="100" colspan="2"> </td> </tr> <tr> <td width="24%" align="right"> 用户名 </td> <td width="76%"> <input type="text" class="inputlogin" name="userId" value="guest"onFocus="this.value=''"> </td> </tr> <tr> <td height="31" align="right"> 密 码 </td> <td> <input type="password" class="inputlogin" name="password" value="guest"onFocus="this.value=''"> </td> </tr> <tr align="center"> <td height="38" colspan="2"> <img style="cursor: hand" src="images/login.gif" alt="提交" width="80" height="24" hspace="8" onKeyDown="if (event.keyCode==13)loginSubmit()"onClick="loginSubmit()"> <img style="cursor: hand" src="images/reset.gif" alt="reset" width="80" height="24" hspace="8" border="0"onClick="reset()"> </td> </tr> </from> </table> </td> </tr> </table> </td> </tr> </table> </body> </html> |
登陆页中将用户设为guest默认用户的设置
日志 > 技术交流
评论列表
温馨提示:点击验证码输入框,以获取验证码
请输入验证码:
loading......
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.