📄 meetroom.jsp
字号:
<%@ page language="java" pageEncoding="gbk"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<title>会议室操作管理</title>
<link href="${pageContext.request.contextPath}/Css_file/oa.css" rel="stylesheet" type="text/css" />
<script>
function check(){
var rname=form1.rname.value;
var raddress=form1.raddress.value;
var rnumber = form1.rnumber.value;
if(rname==""){
document.getElementById("name").innerHTML="<font color=\"red\">会议室名称不能为空</font>";
form1.rname.focus();
return;
}else{
document.getElementById("name").innerHTML="";
}
if(raddress==0){
document.getElementById("address").innerHTML="<font color=\"red\">请选择一个会议地点</font>";
form1.raddress.focus();
return;
}else{
document.getElementById("address").innerHTML="";
}
if(rnumber==""){
document.getElementById("number").innerHTML="<font color=\"red\">请填写容纳人数</font>";
form1.rnumber.focus();
return;
}else{
document.getElementById("number").innerHTML="";
}
form1.submit();
}
</script>
<script>
var xmlHttp;
function createHttpRequest(){
if (window.ActiveXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if (window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
}
function checkname(name){
createHttpRequest();
var url="${pageContext.request.contextPath}/meetroom.do?task=checkname&name="+name;
xmlHttp.open("get",url,true);
xmlHttp.onreadystatechange=callback;
xmlHttp.send(null);
}
function callback(){
if (xmlHttp.readyState == 4){
if (xmlHttp.status == 200){
var text=xmlHttp.responseText;
if(text!=""){
alert(text);
document.form1.rname.value="";
document.form1.rname.focus();
}
}
}
}
</script>
<script>
function isNumber(){
if (window.event.keyCode<48 || window.event.keyCode>57){
window.event.keyCode = 0;
}
}
</script>
</head>
dddddddddddddd
<body>
<html:form action="/meetroom" styleId="form1">
<html:hidden property="rmid" />
<html:hidden property="task" />
<div class="t">
<table width="100%" cellspacing="0" cellpadding="0" class="tr3 f_one">
<tr class="tr3 f_one">
<th>
会议室名称:
</th>
<th>
<html:text property="rname" maxlength="15" onblur="checkname(this.value);" />${name}
<span id="name"></span>
</th>
</tr>
<tr class="tr3 f_two">
<th>
会议室地点:
</th>
<th>
<html:select property="raddress">
<html:option value="0">===请选择==</html:option>
<logic:present name="addrlist" scope="request">
<logic:iterate id="plan" name="addrlist" scope="request">
<html:option value="${plan.pname}"></html:option>
</logic:iterate>
</logic:present>
</html:select>
<span id="address"></span>
</th>
</tr>
<tr class="tr3 f_one">
<th>
容纳人数:
</th>
<th>
<html:text property="rnumber" maxlength="5" style="width: 50px" onkeypress="isNumber();" />
人 <span id="number"></span>
</th>
</tr>
<tr class="tr3 f_two">
<th>
备注:
</th>
<th>
<html:textarea property="rmemo" cols="50" rows="5"></html:textarea>
</th>
</tr>
</table>
</div>
<div style="text-align:center;margin-bottom:25px;">
<logic:equal value="add" scope="request" name="meetroomForm" property="task">
<html:hidden property="rstate" value="0" />
<input type="button" class="btn" value=" 保存 " onclick="check();">
<input type="button" class="btn" value=" 返回 " onclick="javascript:window.history.back();" />
</logic:equal>
<br>
<logic:equal value="edit" scope="request" name="meetroomForm" property="task">
<html:hidden property="rstate" value="0" />
<input type="button" class="btn" value=" 修改 " onclick="check();">
<input type="button" class="btn" value=" 返回 " onclick="javascript:window.history.back();" />
</logic:equal>
</div>
</html:form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -