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

📄 role.jsp

📁 一个jsp的oa系统,里面有很多亮点学习!
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=gb2312"
    pageEncoding="GBK"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<c:if test="${empty role}">
	<c:set var="title" value="新增角色"/>
	<c:set var="method" value="add"/>
</c:if>
<c:if test="${not(empty role)}">
	<c:set var="title" value="编辑角色"/>
	<c:set var="method" value="update"/>
</c:if>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
	background-image: url(../../Images/dw.gif);
}
.ziti {
	font-size: 12px;
}
.font_red {
	color:red;
	font-size: 12px;
}
.bian {
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-top-color: #009933;
	border-right-color: #009933;
	border-bottom-color: #009933;
	border-left-color: #009933;
}
.STYLE1 {font-size: 18px}
-->
</style>
<script type="text/javascript">
	function notDoK(){
		var error=0;
		var mynameobj = document.getElementById("roleName");
		var nameobj = document.getElementById("pname");
		if(mynameobj.value==""){
			nameobj.innerHTML="*角色名称不能为空!";
			mynameobj.focus();
			error=1;
		}else{
			nameobj.innerHTML="";
		}
		if(error==0){
			document.getElementById("myfrom").submit();
		}
		
	}

</script>
</head>
<body>
<h2 class="STYLE1">${title}</h2>
<br><br>
<c:url value="/RoleServlet" var="add"/>
<form action="${add}" method="post" id="myfrom">
<table width="100%" border="0" bgcolor="#FFFFFF">
<input type="hidden" name="method" value="${method}"/>
<input type="hidden" name="roleId" value="${role.roleId}"/>
  <tr>
    <td>&nbsp;</td>
    <td align="right" class="ziti">角色名称:</td>
    <td><input name="roleName" id="roleName" type="text" class="bian" value="${role.roleName}" size="20"><span id="pname" name="pname" class="font_red"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="right" class="ziti">角色描述:</td>
    <td><textarea name="roleDesci" cols="30" rows="8" class="bian" value="${role.roleDesci}">${role.roleDesci}</textarea></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="right"><input name="Submit" type="button" class="ziti" value="提 交" onClick="notDoK()"></td>
    <td>&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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