⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.jsp

📁 基于J2EE的办公自动化系统。实现流程定义流程办理等。运用了hibernate+struts+spring框架综合运用的系统。
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page language="java" pageEncoding="gb2312"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
  	String contextPath = request.getContextPath();
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>登录</title>
<link href="<%=contextPath%>/Css_file/oa2.css" type="text/css" rel="stylesheet" />
<style type="text/css">
<!--
body {
	background-image: url(<%=contextPath%>/Img_file/back.gif);
}
#Layer1 {
	position:absolute;
	width:200px;
	height:204px;
	z-index:1;
	left: 187px;
	top: 181px;
}
#Layer2 {
	position:absolute;
	width:200px;
	height:308px;
	z-index:1;
	left: 158px;
	top: 194px;
}
-->
</style></head>

<script>
	function loadrand(){
		var obj=document.getElementById("code");
		obj.src="<%=contextPath%>/rand_image/rand.jsp";
	} 
	
	function checkform(){
		if(loginform.uname.value==""){
			alert("用户名不能为空!");
			return false;
		}else if(loginform.upwd.value==""){
			alert("密码不能为空!");
			return false;
		}else if(loginform.rand.value==""){
			alert("验证码不能为空!");
			return false;
		}
	}
	
</script>
<body onload="loadrand();">
<div id="Layer2">
  
  <div align="left">
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="207" height="235">
        <param name="movie" value="<%=contextPath%>/Img_file/1.swf" />
        <param name="wmode" value="transparent" />
        <param name="quality" value="high" />
        <embed src="<%=contextPath%>/Img_file/1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="207" height="235"></embed>
      </object>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="257" height="75">
      <param name="movie" value="<%=contextPath%>/Img_file/2.swf" />
      <param name="wmode" value="transparent" />
      <param name="quality" value="high" />
      <embed src="<%=contextPath%>/Img_file/2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="257" height="75"></embed>
    </object>
  </div>
</div>
<html:form action="/login.do?method=login" styleId="loginform" onsubmit="return checkform();">
  <div align="center">
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <table width="650" height="450" background="<%=contextPath%>/Img_file/login.gif">
    <tr>
      <td>
      <table width="622" height="250"  align="center" >
      		<tr>
            <td height="13">&nbsp;</td>
                <td height="13" align="left" >&nbsp;</td>
            </tr>
          <tr align="center" class="tableHead">
            <td height="14" align="right">&nbsp;</td>
            <td height="14" align="left">请输入用户名</td>
          </tr>
          
          <tr>
            <td width="377" height="14" >&nbsp;</td>
                <td width="233" height="14" align="left"><html:text property="uname" styleClass="text" maxlength="15" value="admin"></html:text>
              <html:errors property="uname"/>            </td>
        </tr>
          <tr>
            <td height="14" align="right">&nbsp;</td>
                <td width="233" height="14" align="left">请输入密码</td>
        </tr>
          <tr>
            <td height="14" align="right">&nbsp;</td>
                <td width="233" height="14" align="left"><html:password property="upwd" styleClass="text"  maxlength="15" value="123"></html:password>
              <html:errors property="upwd" />            </td>
        </tr>
          <tr>
            <td height="14" align="center">&nbsp;</td>
                <td height="14" align="left">请输入验证码</td>
        </tr>
          <tr>
            <td height="14" align="center" style="color: red">&nbsp;</td>
                <td height="14" align="left" style="color: red">
                 <html:text property="rand" styleClass="text"  maxlength="4" size="6"></html:text> 
                  <html:errors property="rand"/><img id="code" border="0" />
                  <a href="javascript:loadrand();"/>换一张</td></td>
            </tr>
          <tr>
            <td height="16">&nbsp;</td>
                <td height="16" align="left" ><input name="Submit" type="submit" class="button" value=" 登 录 "  onclick="return check();"/>
                  &nbsp;
                  <input name="Submit2" type="reset" class="button" value=" 重 置 " />
                  <input type="hidden" name="task" value="login" />            </td>
        </tr>
            <tr>
            <td height="13">&nbsp;</td>
                <td height="13" align="left" >&nbsp;</td>
            </tr>
      </table></td></tr>
    </table>
  </div>
  </html:form>    
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -