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

📄 inputdata.jsp

📁 由于信息产业、网络通讯、电子技术的高速发展、宽频网络的应用
💻 JSP
字号:
<%@ page language="java"  pageEncoding="gbk" import="java.sql.ResultSet,dbManager.DBManager,java.util.*"%>

<html>
  <head>
    
    <title>各种仪表数据录入</title>
    <link rel="stylesheet" type="text/css" href="../../../css/secondcss.css">
    <script language=javascript src="../../../script/calendar.js"></script>
	
	<script type="text/javascript">
		
		// 收费项目改变
		function change()
        {
			if( form1.dropRateName.value == "00")
            {
             	alert('请选择要录入的收费项目');
             	return false;
            }
            else
            {
            	form1.hdIndex.value=form1.dropRateName.selectedIndex;
                form1.action="../../../changeRate.do";
	            form1.submit(); 
            }			
        }
        // 页面加载时的操作
        function pageOnload( index )
        {
        	if( index != null )
        	{
        		form1.dropRateName.options[index].selected = true;
        	}
        	
        }
        // 确定按钮
        function checkHouseID()
        {
        	if(form1.txtInputDate.value == "")
        	{
        		alert('录入月份不能为空');
        		return false;
        	}
        	else
        	{
        		form1.action="../../../inputData.do";
        		form1.submit();
        	}
        }
	</script>
  </head>
 <%
	String index = request.getParameter("n");  // 选择的收费项目的索引号
 %> 
 <body onload="pageOnload(<%=index %>)">
 <form name="form1" method="post">
 <table width="99%" border="1">
      <tr>
        <td style="text-align:left">请选择要录入的收费项目:
        <input type="hidden" name="hdIndex" value="">  <!--传递选择的收费项目的索引--> 
       		<select name="dropRateName" onchange="return change();" style="font-size: 9pt">       
	          <option value="00">请选择</option>
	          <%
	          	DBManager db = new DBManager();
				String selRate = "select rateID,rateName from t_rate where type='仪表'";
				ResultSet rsType = db.getResult(selRate);
				while( rsType.next() )
				{
			  %>
			    <option value="<%=rsType.getString("rateID") %>"><%=rsType.getString("rateName") %></option>
			  <%
				}
				db.close();
	           %>
        	</select>
       </td>
       <td style="text-align:left">选择录入的月份:      	
       		<input type="text" name="txtInputDate" onfocus="calendar()" />	
       	</td>
        <td style="text-align:left">
			<img src="../../../images/queren1.gif" width="69" height="22" style="cursor:hand"
		               	onclick="return checkHouseID()"
		                onmousedown="this.src='../../../images/queren3.gif'"
		                onmouseup="this.src='../../../images/queren2.gif'"
				    	onmousemove="this.src='../../../images/queren2.gif'"
		                onmouseout="this.src='../../../images/queren1.gif'">
		    <img src="../../../images/fanhui1.gif"height="22px" style="cursor:hand"
				    	onmousemove="this.src='../../../images/fanhui2.gif'"
		                onmouseout="this.src='../../../images/fanhui1.gif'"
		                onmousedown="this.src='../../../images/fanhui3.gif'"
		                onmouseup="this.src='../../../images/fanhui2.gif'">		
		</td>
      </tr>
    </table> 
    <br>
	<table style="border-top-width: 0px; border-left-width: 0px; background: none transparent scroll repeat 0% 0%;
                border-bottom-width: 0px; letter-spacing: 0px; border-right-width: 0px; border-spacing: 0px">
				
		<%
			List arrayList = (ArrayList)session.getAttribute("rateHouse");
			String houseID="";
			if( arrayList != null )
			{
		%>
			<tr style="background-color:#5D7B9D;color:white;">
			<td>房屋编号</td><td>月表读数</td></tr>
		<%			
				for( int i=0; i<arrayList.size(); i++)
				{
					houseID = (String)arrayList.get(i);
		 %>
		<tr style="background-color: #F7F6F3;color:#333333; ">
					<td style="text-align: left"><%=houseID %></td>
					<td><input type="hidden" name="hidHouseID" value="<%=houseID %>">
					<input type="text" name="txt<%=houseID %>" ></td>
		</tr>
		<%
				}
			}
			session.setAttribute("rateHouse",null);
		 %>
	</table> 
 </form>         	
 </body>
</html>

⌨️ 快捷键说明

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