<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="http://user-20160821pd:8088/com.jdbc2/"> <title>My JSP 'inde ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://user-20160821pd:8088/com.jdbc2/">
<title>My JSP 'index.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 rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<script type="text/javascript">
function chkall() {
//alert(1);
var chkall=document.getElementById("chksall");
var chks=document.getElementsByName("chks");
if(chkall.checked){
for(var i=0;i<chks.length;i++){
chks[i].checked=true;
}
}else{
for(var i=0;i<chks.length;i++){
chks[i].checked=false;
}
}
}
function delchk() {
var ids="";
var chks1=document.getElementsByName("chks");
for(var i=0;i<chks1.length;i++){
if(chks1[i].checked){
ids += chks1[i].value+",";
}
}
alert(ids);
window.location.href="delall.jsp?ids="+ids;
}
</script>
<style type="text/css">
td {
width: 150px
}
</style>
<body>
<h3>員工管理列表</h3>
<form action="select.jsp" method="post">
員工序號:<input type="text" name="nums"> 員工姓名:<input type="text"
name="ename"> <input type="submit" value="查詢">
</form>
<a href="javascript:if(window.confirm('是否批量刪除')){delchk();}">批量刪除</a>
<a href="edit.jsp?modify=1">新增</a>
<table>
<tr>
<td><input type="checkbox" id="chksall" onchange="chkall()">
</td>
<td>序號</td>
<td>姓名</td>
<td>操作</td>
</tr>
<!-- EL語言 -->
<tr>
<td><input type="checkbox" name="chks" value="1004">
</td>
<td>1004</td>
<td>大喬</td>
<td>
<a
href="modify.jsp?modify=0 &&nums=1004 &&ename=大喬">修改</a>
<a href="del.jsp?num=1004 ">刪除</a>
</td>
</tr>
<tr>
<td><input type="checkbox" name="chks" value="1005">
</td>
<td>1005</td>
<td>小喬</td>
<td>
<a
href="modify.jsp?modify=0 &&nums=1005 &&ename=小喬">修改</a>
<a href="del.jsp?num=1005 ">刪除</a>
</td>
</tr>
<tr>
<td><input type="checkbox" name="chks" value="2006">
</td>
<td>2006</td>
<td>悟空</td>
<td>
<a
href="modify.jsp?modify=0 &&nums=2006 &&ename=悟空">修改</a>
<a