增加删除员工HTML和CSS部分
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>练习3</title>
<style>
<!--清空默认设置-->
html{color:#000;background:#FFF}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}
table{border-collapse:collapse;border-spacing:0}
fieldset,img{border:0}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}
ol,ul{list-style:none}
caption,th{text-align:left}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}
q:before,q:after{content:''}
abbr,acronym{border:0;font-variant:normal}
sup{vertical-align:text-top}
sub{vertical-align:text-bottom}
input,textarea,select{
font-family:inherit;
font-size:inherit;
font-weight:inherit
}
input,textarea,select{*font-size:100%}
legend{color:#000}
a{text-decoration: none;}
div{
margin: 0 auto;
text-align: center;
}
table{
width: 500px;
margin: 0 auto;
}
td{
padding: 10px;
border: 1px solid black;
margin: 0;
box-sizing: border-box;
}
input{
width: 350px;
height: 25px;
}
th{
text-align: center;
}
#addEmpButton{
width: 100px;
height: 35px;
}
h4{
width: 100%;
height: 40px;
display: inline-block;
margin: 0 auto;
font-size: 20px;
line-height: 40px;
}
</style>
<script src="../js/l3.js"></script>
</head>
<body>
<table id="employeeTable">
<tr>
<th>姓名</th>
<th>电子邮件</th>
<th>资产(元)</th>
<th> </th>
</tr>
<tr>
<td>trx</td>
<td>trx.12@qq.com</td>
<td>0</td>
<td><a href="deleteEmp?id=001">Delete</a></td>
</tr>
<tr>
<td>lw</td>
<td>lw.12@qq.com</td>
<td>100000000</td>
<td><a href="deleteEmp?id=002">Delete</a></td>
</tr>
<tr class="biankuang">
<td>lj</td>
<td>lj.12@qq.com</td>
<td>100</td>
<td><a href="deleteEmp?id=003">Delete</a></td>
</tr>
</table>
<div id="formDiv">
<h4>添加新员工</h4>
<table>
<tr>
<td class="word">姓名:</td>
<td class="inp">
<input type="text" name="empname" id="empname">
</td>
</tr>
<tr>
<td class="word">电子邮件:</td>
<td class="inp">
<input type="text" name="email" id="email">
</td>
</tr>
<tr>
<td class="word">资产:</td>
<td class="inp">
<input type="text" name="salary" id="salary">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<button id="addEmpButton" value="abc">
提交
</button>
</td>
</tr>
</table>
</div>
</body>
</html>
效果图:
JS部分在javasript专栏里。