📄 addjob.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'addCarTeam.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 check()
{
var x = document.form1.jobsid.value
var y = document.form1.jobsname.value
var z = document.form1.describlejobs.value
if(x=="")
{
alert("职位编号不能为空");
return false;
}
if(y=="")
{
alert("职位名称不能为空");
return false;
}
if(z=="")
{
alert("职位描述不能为空");
return false;
}
else
{
return number();
}
}
function number()
{
var num = document.form1.jobsid.value;
if(isNaN(num) || num>9999)
{
alert("编号必须为小于五位数的整数");
return false;
}
else
{
return true;
}
}
</script>
<body>
<h2 align="center">
增加一个职位
</h2>
<form action="addJob.do" method="post" name="form1" onsubmit="return check();">
<table align="center" border="1" cellpadding="0" width="30%" height="15%"
>
<tr>
<td>
职位编号:
</td>
<td>
<input type="text" name="jobsid">
</td>
</tr>
<tr>
<td>
职位名称:
</td>
<td>
<input type="text" name="jobsname">
</td>
</tr>
<tr>
<td>
职位描述:
</td>
<td>
<input type="text" name="describlejobs">
</td>
</tr>
<tr>
<td>
<input type="submit" value="确认">
</td>
<td>
<input type="reset" value="取消">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -