📄 emplist.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">
<html>
<head>
<base target="_self"/>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>员工列表</title>
<script language="javascript">
function selEmp(){
var parent=window.dialogArguments;
var empIds = document.getElementsByName("empId");
var empNames = document.getElementsByName("empName");
var empIdStr = "";
var empNameStr = "";
for(var i=1;i<empIds.length;i++){
if(empIds[i].checked){
empIdStr= empIdStr+empIds[i].value;
empNameStr= empNameStr+empNames[i].value;
if(i!=(empIds.length-1)){
empIdStr=empIdStr+",";
empNameStr=empNameStr+",";
}
}
}
parent.document.getElementById("acceptPersonId").value=empIdStr;
parent.document.getElementById("acceptPersonName").value=empNameStr;
window.close();
}
</script>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
<body>
<br>
<form action="">
<input type="hidden" name="empId" id="empId"/>
<input type="hidden" name="empName" id="empName"/>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#00FF99">
<tr bgcolor="#00FF99">
<td height="30" align="center">员工名称</td>
</tr>
<c:forEach items="${emps}" var="emp">
<tr bgcolor="#CCFFFF">
<td height="25" align="left">
<input type="checkbox" name="empId" id="empId" value="${emp.empId}"/>
<input type="hidden" name="empName" id="empName" value="${emp.empName}"/>
${emp.empName}</td>
</tr>
</c:forEach>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="35" align="center"><input type="submit" name="button" id="button" value="确认选择" onClick="selEmp()"></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -