⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 handin.jsp

📁 利用java编写的一个学生宿舍管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java"  import="mydesign.*"%>
<%
if(session.getAttribute("admin")==null)
     out.print("<script>alert('请先登录!');window.location.href='login.htm'</script>");
%>

<%
String table=(String)session.getAttribute("table");
Expense expense=(Expense)session.getAttribute("expense");
%>
<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.expense.value==""||form.expense.value=="0.0")
   {
      //显示错误信息
      alert("请输入缴纳金额!");
      //将光标移至缴纳输入栏
      document.form.elements(0).focus();
    }else{
	  form.submit();//送出表单中的资料
    }
 }										  
-->
</script>
</head>

<body>
<%@ include file="head.htm" %>
<p>&nbsp;</p>
<p>&nbsp;</p>
<form name="form" method="post" action="/MyDesign/Handin">
  <table width="27%" border="1" align="center" bordercolor="#660000" bgcolor="#CCCCCC">
    <tr> 
      <td colspan="2" height="56"><div align="center"><font color="#660000" size="6"><strong><font size="5">&nbsp;缴纳<%=((table.equals("water"))?"水费":"电费")%></font></strong> </font></div></td>
    </tr>
    <tr> 
      <td width="48%" height="34"> <div align="center"><font color="#660000" size="3">楼号</font></div></td>
      <td width="52%"><div align="center"><strong><font color="#660000" size="3"> 
          <%=expense.getDonghao()%></font></strong></div></td>
    </tr>
    <tr> 
      <td height="35"><div align="center"><font color="#660000" size="3">房号</font></div></td>
      <td><p align="center"><strong><font color="#660000" size="3"><%=expense.getHouseid()%></font></strong></p></td>
    </tr>
    <tr> 
      <td height="35"><div align="center"><font color="#660000" size="3">缴纳金额</font></div></td>
      <td><div align="center"><strong>
          <input name="expense" type="text" id="expense" value="<%=expense.getExpense()%>" size="10" maxlength="10">
          元 </strong></div></td>
    </tr>
    <tr> 
      <td  height="47" colspan="2"> <div align="center"> <font color="#660000" size="3"> 
          <input type="button" name="Submit" value="缴纳" onClick="datacheck()">
          &nbsp; 
          <input type="button" name="Submit2" value="返回">
          </font></div></td>
    </tr>
  </table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -