📄 visitor.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<%
if(session.getAttribute("admin")==null)
out.print("<script>alert('请先登录!');window.location.href='login.htm'</script>");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>来访登记</title>
<link href="css/mycss.css" rel="stylesheet" type="text/css">
<SCRIPT Language="JavaScript">
<!--
//下面的副程序将执行资料检查
function datacheck()
{
//下面的if判断语句将检查是否输入帐号资料
if(form.donghao.value=="")
{
alert("请输入楼号!");
document.form.elements(0).focus();
}else{
if(form.houseid.value=="")
{
alert("请输入房号!");
document.form.elements(3).focus();
}else{
if(form.visitednm.value=="")
{
alert("请输入被访人姓名!");
document.form.elements(4).focus();
}else{
if(form.visitornm.value=="")
{
alert("请输入来访人姓名!");
document.form.elements(5).focus();
}else{
if(form.guanxi.value=="")
{
alert("请选择所属关系!");
document.form.elements(6).focus();
}else{
if(form.zhengjian.value=="")
{
alert("请输入证件名称!");
document.form.elements(7).focus();
}else{
if(form.zjnm.value=="")
{
alert("请输入证件号码");
document.form.elements(8).focus();
}else{
if(form.visittime.value=="")
{
alert("请输入来访时间");
document.form.elements(8).focus();
}else{
if(form.inturn.value=="")
{
alert("请输入值班人");
document.form.elements(9).focus();
}else{
form.submit();
}
}
}
}
}
}
}
}
}
}
-->
</script>
</head>
<body>
<%@ include file="head.htm" %>
<p> </p>
<p> </p>
<form action="/MyDesign/AddVisitor" method="post" name="form" id="form">
<table width="30%" border="1" align="center" bordercolor="#660000" bgcolor="#CCCCCC">
<tr>
<td colspan="2"><div align="center"><font color="#660000" size="6"><strong>来访登记</strong></font></div></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">楼号</font></div></td>
<td><input name="donghao" type="text" id="donghao" size="20" maxlength="2"></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">房号</font></div></td>
<td><input name="houseid" type="text" id="houseid" size="20" maxlength="4"></td>
</tr>
<tr>
<td width="40%"><div align="center"><font color="#660000">被访人姓名</font></div></td>
<td width="60%"><input name="visitednm" type="text" id="visitednm" size="20" maxlength="8">
</td>
</tr>
<tr>
<td><div align="center"><font color="#660000">来访人姓名</font></div></td>
<td><input name="visitornm" type="text" id="visitornm" size="20" maxlength="8"></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">所属关系</font></div></td>
<td><select name="guanxi" id="guanxi">
<option value="">请选择</option>
<option value="同学">同学</option>
<option value="家属">家属</option>
<option value="朋友">朋友</option>
<option value="其他">其他</option>
</select></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">证件名称</font></div></td>
<td><input name="zhengjian" type="text" id="zhengjian" size="20" maxlength="20"></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">证件号码</font></div></td>
<td><input name="zjnm" type="text" id="zjnm" size="20" maxlength="20"></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">来访时间</font></div></td>
<td><input name="visittime" type="text" id="visittime" size="20" maxlength="20"></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">值班人</font></div></td>
<td><input name="inturn" type="text" id="inturn" size="20" maxlength="8"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="button" name="Submit" value="登记" onClick="datacheck()">
<input type="reset" name="Submit2" value="重填">
</div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -