?? room_eh.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,imis_hous.com.impl.*,common.DepartmentsBean,java.util.*" errorPage="" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="/Imis/imis_hous/css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="/Imis/imis_hous/jf/checkdata.js">
</script>
<script language="JavaScript">
function checkValue() {
var J_RoomNu = document.form1.J_RoomNu.value;
if (J_RoomNu=="") {
window.alert("請輸入房間代號");
document.form1.J_RoomNu.focus();
return false;
}
if (J_RoomNu.lenght > 30){
window.alert("請輸入房間代號長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_RoomNu.focus();
return false;
}
if(J_RoomNu!=null){
var regp =/^[0-9a-zA-Z]{1,30}$/;
if(J_RoomNu.match(regp)==null){
document.form1.J_RoomNu.focus();
window.alert("輸入的房間代號格式錯誤?。”仨毷亲帜负蛿底纸M成");
return false;
}
}
var J_BuildingNu = document.form1.J_BuildingNu.value;
if (J_BuildingNu=="") {
window.alert("請輸入建筑物代號");
document.form1.J_BuildingNu.focus();
return false;
}
if (J_BuildingNu.lenght > 30){
window.alert("輸入建筑物代號長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_BuildingNu.focus();
return false;
}
var J_LayerNu = document.form1.J_LayerNu.value;
if (J_LayerNu.lenght > 30){
window.alert("輸入建筑物樓層長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_LayerNu.focus();
return false;
}
var J_RoomArea = document.form1.J_RoomArea.value;
if (J_RoomArea=="") {
window.alert("請輸入房間大小");
document.form1.J_RoomArea.focus();
return false;
}
if (J_RentFee!=""){
var regp = /(^[\d]{1,6}|^[\d]{1,6})($|[\.][\d]{0,2}$)/;
if (J_RentFee.match(regp) == null)
{
document.form1.J_RoomArea.focus();
alert("輸入房間大小格式錯誤!使用“0.00”格式");
return false;
}
}
var J_RoomDirect = document.form1.J_RoomDirect.value;
if (J_RoomDirect.lenght > 30){
window.alert("輸入房間朝向長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_RoomDirect.focus();
return false;
}
var J_Memo = document.form1.J_Memo.value;
if (J_Memo.lenght > 100){
window.alert("輸入建筑物備注長度超出,限定為50個中文字符或者100個英文字符。");
document.form1.J_Memo.focus();
return false;
}
return true;
}
</script>
</head>
<body background="/Imis/imis_hous/css/images/bg_main.png">
<table width="100%" border="0" class="ziti" align="center">
<tr>
<td colspan="2" height="20" background="/Imis/imis_hous/css/images/bg_main2.png"><font color="#000000">房間信息錄入</font></td>
</tr>
</table>
<form name="form1" method="post" action="/Imis/servlet/Room_sl?id=add" onsubmit="return checkValue()">
<table width="100%" border="0" class="ziti" background="/Imis/imis_hous/css/images/bg_main.png" align="center">
<tr>
<td width="388"><div align="right">房間代號:</div></td>
<td width="383"><input name="J_RoomNu" type="text" class="text1" size="20" maxlength="30">
<c:if test="${requestScope.RoomInfo!=null}">
<font color="red"> ${requestScope.RoomNuNotExist}</font>
</c:if>
<font color=red>*</font></td>
</tr>
<tr>
<td><div align="right">建筑物名稱:</div></td>
<td>
<select name="J_BuildingNu" class="text1">
<%
HashMap hashDept = new GetBuNu().getDepartmentNU();
int length = hashDept.size();
String []deptName = new String[length];//部門數組
String []deptId= new String[length];//部門用房面積數組
Iterator itDeptId = hashDept.keySet().iterator();//鍵迭代
Iterator itDeptName = hashDept.values().iterator();//值迭代
int i=0;
while(itDeptId.hasNext()){
deptId[i] = itDeptId.next().toString();
i++;
}
i=0;
while(itDeptName.hasNext()){
deptName[i] = itDeptName.next().toString();
i++;
}
for(int j=0;j<length;j++ ){
%>
<option value=<%=deptId[j] %>><%= deptName[j] %></option>
<% }%>
</select>
</td>
</tr>
<tr>
<td><div align="right">樓層:</div></td>
<td><input name="J_LayerNu" type="text" class="text1" size="20" maxlength="30"></td>
</tr>
<tr>
<td><div align="right">房間大小:</div></td>
<td><input name="J_RoomArea" type="text" class="text1" value="0.00" size="10">
<font color=red>*</font></td>
</tr>
<tr>
<td><div align="right">房間朝向:</div></td>
<td>
<select name="J_RoomDirect" class="text1">
<option selected value="東">東</option>
<option value="南">南</option>
<option value="西">西</option>
<option value="北">北</option>
<option value="東南">東南</option>
<option value="西南">西南</option>
<option value="東北">東北</option>
<option value="西北">西北</option>
<option value="其它">其它</option>
</select>
</td>
</tr>
<tr>
<td><div align="right">房間狀況:</div></td>
<td><select name="J_RoomStatus" class="text1">
<option selected value="1">良好</option>
<option value="2">破損</option>
<option value="3">拆除</option>
</select></td>
</tr>
<tr>
<td><div align="right">使用標志:</div></td>
<td><select name="J_RoomUseFlag" class="text1">
<option selected value="1">閑置</option>
<option value="2">已使用</option>
<option value="3">出租</option>
</select></td>
</tr>
<tr>
<td><div align="right">使用部門:</div></td>
<td>
<select name="J_UseDept" class="text1">
<%
int deptId1= 0;
String deptName1 = null;
DepartmentsBean describe = new DepartmentsBean();
ArrayList list = describe.getDepts();
Iterator itr = list.iterator();
while (itr.hasNext()) {
Hashtable ht = (Hashtable) itr.next();
deptId1 = Integer.parseInt(ht.get("deptId").toString());
deptName1 = ht.get("deptName").toString();
%>
<option value=<%=deptId1%>><%=deptName1%></option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td><div align="right">備注:</div></td>
<td><textarea name="J_Memo" rows="5" class="text1"></textarea></td>
</tr>
<tr><td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><div align="center" >
<input type="submit" name="Submit" value="提 交" class="anniu">
<input type="reset" name="Submit2" value="重 置" class="anniu">
</div></td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -