员工信息修改 - 在线编辑员工信息
<form action='update' method='post'>
<h2 style='text-align:center; color:midnightblue;'>修改员工信息</h2>
<pre><code><table cellpadding='0' border='1' align='center' style='background-color: blueviolet;'>
<tr>
<td>编号</td>
<td><input type='text' name='empno' readonly value='${emp.empno}'/></td>
</tr>
<tr>
<td>姓名</td>
<td><input type='text' name='ename' value='${emp.ename}'/></td>
</tr>
<tr>
<td>工作</td>
<td><input type='text' name='job' value='${emp.job}'/></td>
</tr>
<tr>
<td>领导编号</td>
<td><input type='text' name='mgr' value='${emp.mrg}'/></td>
</tr>
<tr>
<td>入职日期</td>
<td><input type='date' name='hiredate' value='${emp.hiredate}'/></td>
</tr>
<tr>
<td>工资</td>
<td><input type='text' name='sal' value='${emp.sal}'/></td>
</tr>
<tr>
<td>奖金</td>
<td><input type='text' name='comm' value='${emp.comm}'/></td>
</tr>
<tr>
<td>部门编号</td>
<td><input type='text' name='deptno' value='${emp.deptno}'/></td>
</tr>
<tr align='center'>
<td colspan='2'><input type='submit' value='提交'></td>
</tr>
</table>
</code></pre>
</form>
<script>
window.onload = function() {
document.querySelector('form').addEventListener('submit', function(e) {
e.preventDefault();
alert('修改成功');
});
}
</script>
原文地址: https://www.cveoy.top/t/topic/o1Cp 著作权归作者所有。请勿转载和采集!