📄 tianjia.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%
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 'Tianjia.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">
-->
<script>
function hello()
{
var bu=document.form.bumen.value;
var xingm=document.form.xingming.value;
var mi=document.form.mima.value;
var queren=document.form.querenmima.value;
var xingb=document.form.xingbie.value;
var sheng=document.form.shengri.value;
var zhi=document.form.zhiwu.value;
if(bu==""){alert("部门不能为空");}
else if(xingm==""){alert("姓名不能为");}
else if(mi==""){alert("密码不能为空");}
else if(queren==""){alert("确认密码不能为空");}
else if(mi=!queren){alert("确认密码与密码不一致请保证确认密码与密码一致");}
else if(xingb==""){alert("性别不能为空");}
else if(sheng==""){alert("生日不能为空");}
else if(zhi==""){alert("职务不能为空");}
else{document.form.submit();}
}
</script>
</head>
<body>
<form name="form" action="AddTable">
<table align="center" border="1">
<tr>
<td>所属部门</td>
<td><b>year:</b>
<select name="bumen">
<option >selet...</option>
<%
java.util.ArrayList list=(ArrayList)request.getAttribute("l1");
for( int i=0;i<list.size();i++){
com.isoftstone.banktearm1.vo.XinjianVo1 m=(com.isoftstone.banktearm1.vo.XinjianVo1)list.get(i);
%> <option value="<%=m.getDepartmentID() %>"><%=m.getStr() %></option>
<% }
%>
</select></td>
</tr>
<tr>
<td>姓名</td>
<td><input type="text" name="xingming"></td>
</tr>
<tr>
<td> 密码</td>
<td><input type="text" name="mima"></td>
</tr>
<tr>
<td>确认密码</td>
<td><input type="text" name="querenmima"></td>
</tr>
<tr>
<td>性别</td>
<td><select name="xingbie">
<option value="男">男</option>
<option value="女">女</option>
</select></td>
</tr>
<tr>
<td>生日</td>
<td><input type="text" name="shengri"></td>
</tr>
<tr>
<td>职务</td>
<td><input type="text" name="zhiwu"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" value="添加" onclick="hello()">
<input type="button" value="关闭" onclick="javascript:window.location.href='top.jsp';">
</td>
</tr>
</table></form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -