?? updatevisitor.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*,java.sql.*,mydesign.*"%>
<%
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">
<!--
//下面的副程序將執(zhí)行資料檢查
function datacheck()
{
//下面的if判斷語句將檢查是否輸入帳號資料
if(form.visitornm.value=="")
{
alert("請輸入來訪人姓名!");
document.form.elements(0).focus();
}else{
if(form.zhengjian.value=="")
{
alert("請輸入證件名稱!");
document.form.elements(2).focus();
}else{
if(form.zjnm.value=="")
{
alert("請輸入證件號碼!");
document.form.elements(3).focus();
}else{
if(form.visittime.value=="")
{
alert("請輸入來訪時間!");
document.form.elements(4).focus();
}else{
if(form.inturn.value=='')
{
alert("請輸入值班人姓名!");
document.form.elements(5).focus();
}else{
form.submit();
}
}
}
}
}
}
-->
</script>
</head>
<body>
<%@ include file="head.htm" %>
<p> </p>
<p> </p>
<%
Visitor visitor=(Visitor)session.getAttribute("visitor");
%>
<form action="/MyDesign/UpdateVisitor" 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="5"><strong>修改來訪信息</strong></font></div></td>
</tr>
<tr>
<td width="40%"><div align="center"><font color="#660000" size="3">棟號</font></div></td>
<td width="60%"><font color="#660000" size="3"> <%=visitor.getDonghao()%></font></td>
</tr>
<tr>
<td><div align="center"><font color="#660000" size="3">房間號碼</font></div></td>
<td><font color="#660000" size="3"> <%=visitor.getHouseid()%></font></td>
</tr>
<tr>
<td> <div align="center"><font color="#660000" size="3">被訪人姓名</font></div></td>
<td><%=visitor.getVisitednm()%></td>
</tr>
<tr>
<td><div align="center"><font color="#660000" size="3">來訪人姓名</font></div></td>
<td><font color="#660000" size="3">
<input name="visitornm" type="text" id="visitornm" value="<%=visitor.getVisitornm()%>" size="20" maxlength="8">
</font></td>
</tr>
<tr>
<td><div align="center"><font color="#660000" size="3">所屬關系</font></div></td>
<td><font color="#660000" size="3">
<select name="guanxi">
<option <%=((visitor.getGuanxi().toString().equals(("同學").toString()))?"SELECTED":"")%>>同學</option>
<option <%=((visitor.getGuanxi().toString().equals(("家屬").toString()))?"SELECTED":"")%>>家屬</option>
<option <%=((visitor.getGuanxi().toString().equals(("朋友").toString()))?"SELECTED":"")%>>朋友</option>
</select>
</font></td>
</tr>
<tr>
<td><div align="center"><font color="#660000" size="3">證件名稱</font></div></td>
<td><font color="#660000" size="3">
<input name="zhengjian" type="text" id="zhengjian" value="<%=visitor.getZhengjian()%>" size="20" maxlength="20">
</font></td>
</tr>
<tr>
<td><div align="center"><font color="#660000">證件號碼</font></div></td>
<td><input name="zjnm" type="text" id="zjnm" value="<%=visitor.getZjnm()%>" 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" value="<%=visitor.getVisittime()%>" 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" value="<%=visitor.getInturn()%>" size="20" maxlength="20"></td>
</tr>
<tr>
<td colspan="2"><div align="center"> <font color="#660000">
<input type="button" name="Submit" value="修改" onClick="datacheck()">
<input type="reset" name="Submit2" value="重置">
</font></div></td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -