meetroom.jsp
上传用户:lm2018
上传日期:2015-12-12
资源大小:30449k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="gbk"%>
  2. <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
  3. <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
  4. <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
  5. <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html:html lang="true">
  8. <head>
  9. <title>会议室操作管理</title>
  10. <link href="${pageContext.request.contextPath}/Css_file/oa.css" rel="stylesheet" type="text/css" />
  11. <script>
  12. function check(){
  13. var rname=form1.rname.value;
  14. var raddress=form1.raddress.value;
  15. var rnumber = form1.rnumber.value;
  16. if(rname==""){
  17. document.getElementById("name").innerHTML="<font color="red">会议室名称不能为空</font>";
  18. form1.rname.focus();
  19. return;
  20. }else{
  21. document.getElementById("name").innerHTML="";
  22. }
  23. if(raddress==0){
  24. document.getElementById("address").innerHTML="<font color="red">请选择一个会议地点</font>";
  25. form1.raddress.focus();
  26. return;
  27. }else{
  28. document.getElementById("address").innerHTML="";
  29. }
  30. if(rnumber==""){
  31. document.getElementById("number").innerHTML="<font color="red">请填写容纳人数</font>";
  32. form1.rnumber.focus();
  33. return;
  34. }else{
  35. document.getElementById("number").innerHTML="";
  36. }
  37. form1.submit();
  38. }
  39. </script>
  40. <script>
  41. var xmlHttp;
  42. function createHttpRequest(){
  43. if (window.ActiveXObject){
  44. xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  45. }else if (window.XMLHttpRequest){
  46. xmlHttp = new XMLHttpRequest();
  47. }
  48. }
  49. function checkname(name){
  50. createHttpRequest();
  51. var url="${pageContext.request.contextPath}/meetroom.do?task=checkname&name="+name;
  52. xmlHttp.open("get",url,true);
  53. xmlHttp.onreadystatechange=callback;
  54. xmlHttp.send(null);
  55. }
  56. function callback(){
  57. if (xmlHttp.readyState == 4){
  58. if (xmlHttp.status == 200){
  59. var text=xmlHttp.responseText;
  60. if(text!=""){
  61. alert(text);
  62. document.form1.rname.value="";
  63. document.form1.rname.focus();
  64. }
  65. }
  66. }
  67. }
  68. </script>
  69. <script>
  70. function isNumber(){
  71. if (window.event.keyCode<48 || window.event.keyCode>57){
  72. window.event.keyCode = 0;
  73. }
  74. }
  75. </script>
  76. </head>
  77. dddddddddddddd
  78. <body>
  79. <html:form action="/meetroom" styleId="form1">
  80. <html:hidden property="rmid" />
  81. <html:hidden property="task" />
  82. <div class="t">
  83. <table width="100%" cellspacing="0" cellpadding="0" class="tr3 f_one">
  84. <tr class="tr3 f_one">
  85. <th>
  86. 会议室名称:
  87. </th>
  88. <th>
  89. <html:text property="rname" maxlength="15" onblur="checkname(this.value);" />${name}
  90. <span id="name"></span>
  91. </th>
  92. </tr>
  93. <tr class="tr3 f_two">
  94. <th>
  95. 会议室地点:
  96. </th>
  97. <th>
  98. <html:select property="raddress">
  99. <html:option value="0">===请选择==</html:option>
  100. <logic:present name="addrlist" scope="request">
  101. <logic:iterate id="plan" name="addrlist" scope="request">
  102. <html:option value="${plan.pname}"></html:option>
  103. </logic:iterate>
  104. </logic:present>
  105. </html:select>
  106. <span id="address"></span>
  107. </th>
  108. </tr>
  109. <tr class="tr3 f_one">
  110. <th>
  111. 容纳人数:
  112. </th>
  113. <th>
  114. <html:text property="rnumber" maxlength="5" style="width: 50px" onkeypress="isNumber();" />
  115. &nbsp;&nbsp;人 <span id="number"></span>
  116. </th>
  117. </tr>
  118. <tr class="tr3 f_two">
  119. <th>
  120. 备注:
  121. </th>
  122. <th>
  123. <html:textarea property="rmemo" cols="50" rows="5"></html:textarea>
  124. </th>
  125. </tr>
  126. </table>
  127. </div>
  128. <div style="text-align:center;margin-bottom:25px;">
  129. <logic:equal value="add" scope="request" name="meetroomForm" property="task">
  130. <html:hidden property="rstate" value="0" />
  131. <input type="button" class="btn" value=" 保存 " onclick="check();">
  132. <input type="button" class="btn" value=" 返回 " onclick="javascript:window.history.back();" />
  133. </logic:equal>
  134. <br>
  135. <logic:equal value="edit" scope="request" name="meetroomForm" property="task">
  136. <html:hidden property="rstate" value="0" />
  137. <input type="button" class="btn" value=" 修改 " onclick="check();">
  138. <input type="button" class="btn" value=" 返回 " onclick="javascript:window.history.back();" />
  139. </logic:equal>
  140. </div>
  141. </html:form>
  142. </body>
  143. </html:html>