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

📄 buildusertoroes.jsp

📁 oa rar it is the jsp
💻 JSP
字号:
<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=GBK"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>My JSP 'BuildUsertoRoes.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
	<link href="<%=request.getContextPath()%>/css/style_2.css" rel="stylesheet">

	</head>

	<body>
	<script type="text/javascript">
	
	function validateData(){
	
		var perId = window.document.form1.perId.value;
		var roesId = window.document.form1.roesId.value;
		if(perId == ""){
		alert("请选择人员名!!");
		return;
		}
		if(roesId == ""){
		alert("请选择角色!!");
		return;
		}
		window.document.form1.submit();
	
	}
	</script>
	<form name="form1" action="<%=request.getContextPath()%>/servlet/BuildRoesAndUserServlet" method="post" target="bottomFrame">
		<table width="100%">
			<tr align="center" valign="middle" bgcolor="#DFE7F0">
				<td width="30%" height="23" bgcolor="#EEF2F9">
					员工姓名
				</td>
				<td>
					<select name="perId" >
						<option value="" selected="selected">--请选择用户--</option>
						<c:if test="${!(empty notRoesUserName)}">
						<c:forEach items="${notRoesUserName}" var="notRoesUser">
						<option value="${notRoesUser.id}">${notRoesUser.name}</option>
						</c:forEach>
						</c:if>
						</select>
				</td>
				<td width="30%" height="23" bgcolor="#EEF2F9">
					角色名
				</td>
				<td width="30%" height="23" bgcolor="#EEF2F9">
					<select name="roesId">
						<option value="">
							--请选择角色--
						</option>
						<c:if test="${! empty roesnames}">
						<c:forEach items="${roesnames}" var="roesname">
					    <option value="${roesname.id}">${roesname.roesName}</option>
						</c:forEach>
						</c:if>
					</select>
				</td>
			</tr>
			<tr>
				<td align="center" bgcolor="#EEF2F9" colspan="4">
					<input type="button" name="Submit" value="提交" onclick="validateData()">
				</td>
				</tr>
		</table>
		</form>
	</body>
</html>

⌨️ 快捷键说明

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