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

📄 modifycellinput.jsp

📁 JSP物业管理系统 一份比较完整的物业管理系统源码。 对于初学者可以有一定的借鉴。
💻 JSP
📖 第 1 页 / 共 3 页
字号:
    	return false;
    }
    if (inputForm.balcony.value!=""&&ChkDigit1(inputForm.balcony.value)==false){
    	alert("阳台的个数必须为数字!");
    	inputForm.balcony.focus();
    	return false;
    }
    if (inputForm.elseroom.value!=""&&ChkDigit1(inputForm.elseroom.value)==false){
    	alert("其他的个数必须为数字!");
    	inputForm.elseroom.focus();
    	return false;
    }
    if (inputForm.architecturearea.value!=""&&ChkDigit2(inputForm.architecturearea.value)==false){
    	alert("建筑面积只能是数字或小数点!");
    	inputForm.architecturearea.focus();
    	return false;
    }
    if (inputForm.usingarea.value!=""&&ChkDigit2(inputForm.usingarea.value)==false){
    	alert("使用面积只能是数字或小数点!");
    	inputForm.usingarea.focus();
    	return false;
    }
    if (inputForm.price.value!="") {
        var len=0;
        for (i=0;i<inputForm.price.value.length;i++) {
            if (inputForm.price.value.charAt(i)=='.')
                len++;
        }
        if (len==1) {
            if (inputForm.price.value.length<2) {  
                alert("输入的售价不正确"); 
                inputForm.price.focus();
               return false;  
            } 
            var ss = inputForm.price.value;
        	var subLen = ss.substring(ss.indexOf(".")+1);//得到小数点后面的位数
        	
        	if (subLen.length>2) {
        		alert("输入的售价不正确,小数点后最多只有两位!"); 
                inputForm.price.focus();
                return false;  
        	}  
        }
        if (len>1) {
            alert("输入的售价不正确");     
            inputForm.price.focus();
            return false;   
        }      
       if (ChkFeeStandard(inputForm.price.value)==false) {
		  inputForm.price.focus();
          return false;
	   }
	   
    }
    if (inputForm.fitment.value.length>50){
        alert("装修情况不能超过50个字!");
        inputForm.fitment.focus();
        return false;
    }
    if (inputForm.remark.value.length>100){
        alert("备注不能超过100个字!");
        inputForm.remark.focus();
        return false;
    }
    inputForm.crdate.value=inputForm.cryear.value+'-'+inputForm.crmonth.value+'-'+inputForm.crday.value;
	inputForm.enterdate.value=inputForm.enteryear.value+'-'+inputForm.entermonth.value+'-'+inputForm.enterday.value;
	
	handleForm(form1);
}       

var filenum2 = 0;   
var linenumber=0;
var fileheadnum = 0;  

function handleForm(inputForm) 
{
	var str="";
	var del2="☆";
	var del ="※";
	for (i=0; i<inputForm.elements.length; i++)
	{
                if ((inputForm.elements[i].name!="txId")&&(inputForm.elements[i].name!="inputString")&&(inputForm.elements[i].type!="button"))
		{
                if ((inputForm.elements[i].name.toUpperCase() != "提交") &&
			(inputForm.elements[i].name.toUpperCase() != "复位"))
		{
			if ((inputForm.elements[i].type == "radio") ||
				(inputForm.elements[i].type == "checkbox"))
			{
				if (inputForm.elements[i].checked)
				{
					str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
				}
			}
			else if (inputForm.elements[i].type == "select-one")
			{
				str = str+inputForm.elements[i].name
						+del2+inputForm.elements[i].options[inputForm.elements[i].selectedIndex].value+del;
			}
			else 
			{
				str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
			}
                        }
		}
	} 
	str=str.substr(0,str.length-del.length);			
	inputStr=str;
	inputForm.inputString.value=str;
	inputForm.submit();
}

function InsertLine()
{
		
		var outstring = '';
		if (filenum2==0) {

			outstring = '<table  align="center" width="100%" cellpadding="0" cellspacing="0"><tr><td align="center"><table width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#ffffff"  border="1" id="filehead' + fileheadnum + '"><tr><td width="10%">&nbsp</td><td width="50%" align="center">图片文件路径</td><td width="40%" align="center">图片文件说明</td></tr></table></td></tr></table>';
			eval('document.all.tb0.insertAdjacentHTML("AfterEnd",outstring)');
			fileheadnum++;
			}
            outstring='<table align="center" width="100%" cellpadding="0" cellspacing="0"><tr><td align="center"><table width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#ffffff" border="1" id="tb' + (linenumber + 1) + '"><tr>' +
          			  '<td width="10%" align="center"><INPUT value="删除" class="button" type="button" onclick="SetToDel(' + (linenumber + 1) + ')"><input value="10" id="hide' + (linenumber + 1) + '" name="hide' + (linenumber + 1) + '" type="hidden"></td>'+
                      '</td><td width="50%"><input type="file" id="filepath'+(linenumber + 1)+'" name="filepath'+(linenumber + 1)+'" size="28"></td><td width="40%"><input id="describe' + (linenumber + 1) + '" name="describe' + (linenumber + 1) + '" type="text" size="32"></td></tr></table></td></tr></table>';
            if (filenum2==0){

            	eval('document.all.filehead' + (fileheadnum -1)+ '.insertAdjacentHTML("AfterEnd", outstring)');
            } else {
       	
				eval('document.all.tb' + linenumber + '.insertAdjacentHTML("AfterEnd", outstring)');
            }
            linenumber++;
            filenum2=filenum2+1;
  
}
function SetToDel(number)
{
	if (filenum2==1){
		eval('document.all.filehead' + (fileheadnum-1) + '.style.display="none"');
		
	}
    eval('document.all.tb' + number + '.style.display="none"');
    eval('document.all.hide' + number + '.value="00"');
    eval('document.all.describe' + number + '.value=""');
    eval('document.all.filepath' + number + '.disabled=true');
   
	filenum2=(filenum2-1);
}
function DelCurren(picnum)
{
    eval('document.all.pic' + picnum + '.style.display="none"');
    eval('document.all.curhide' + picnum + '.value="01"');
}

</script>
<script language="javascript">
function RetApp(){
var del2="☆";
var del ="※";	
	document.form4.inputString.value="subareanumb"+del2+"<%=subareanumb%>"+del+"buildingnumb"+del2+"<%=buildingnumb%>"+del+"doornumb"+del2+"<%=doornumb%>"+del+"floornumb"+del2+"<%=floornumb%>"+del+"cellnumb"+del2+"<%=cellnumb%>"+del+"number"+del2+"<%=number1%>"+del;
	
	document.form4.submit();
	
}

</script>
</head>
<body bgColor="#d4d0c8" leftMargin="0" topMargin="0" vLink="#003399" marginwidth="0" marginheight="0" onLoad="this.focus();MM_preloadImages('/pmsApp/images/button_query_over.gif','/pmsApp/images/button_save_over.gif','/pmsApp/images/button_cancel_over.gif')" >
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="/pmsApp/servlet/common.PMS">
  <input type="hidden" name="txId" id="txId" value="2014">
  <input type="hidden" name="inputString" id="inputString">
  <input type="hidden" name="number1" value="<%=number1%>">
  <table width="100%" border="0" cellspacing="0" cellpadding="2">
    <tr> 
      <td height="28" background="/pmsApp/images/toolbar2.gif" valign="top"><img src="/pmsApp/images/blank.gif" width="10" height="1"><img src="/pmsApp/images/button_new_gray.gif" width="55" height="20"><img name="Image10" border="0" src="/pmsApp/images/button_modify_gray.gif" width="55" height="20"><img name="Image11" border="0" src="/pmsApp/images/button_del_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_split.gif" width="8" height="20"><a href="/pmsApp/baseinfo/RetrieveByCInput.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','/pmsApp/images/button_query_over.gif',1)"><img name="Image13" border="0" src="/pmsApp/images/button_query.gif" width="55" height="20" alt="条件检索"></a><img src="/pmsApp/images/button_split.gif" width="8" height="20"><a href="#"></a></td>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td><img src="/pmsApp/images/tab_left.gif" width="3" height="25"></td>
      <td width="100%" background="/pmsApp/images/tab_mid.gif" height="25"> 
        <table width="200" border="0" cellspacing="0" cellpadding="0">
          <tr align="center"> 
            <td width="100" background="/pmsApp/images/tab_up.gif" height="25">单元基本资料</td>
            <td width="100" background="/pmsApp/images/tab_down_right.gif"><a href="javascript:RetApp()">水、电、煤气表</a></td>
            
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <table width="300" border="1"  align="center" bgcolor="#eeffee" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" height="22">
    <tr>
      <td align="center">修改单元资料 </td>
  </tr>
</table>
  <br>
  <table border="1" width="98%"  align="center" bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">

    <tr bgcolor="#d4d0c8">
      <td width="349" height="25" align="center">单元编号 
        <input type="hidden" name="oricellnumb" value="<%=cellnumb%>">
	<input type="hidden" name="orifloortype" value="<%=floortype%>">
    <input type="hidden" name="orifloornumb" value="<%=floornumb%>">
    <input type="hidden" name="oridoornumb" value="<%=doornumb%>">
    <input type="hidden" name="oribuildingnumb" value="<%=buildingnumb%>">
    <input type="hidden" name="orisubareanumb" value="<%=subareanumb%>"></td>
      <td height="25" width="279"> 
        <input type="text" name="cellnumb" value="<%=cellnumb%>">
        <font color="#FF3300">*</font> </td>
      <td height="25" align="center" width="113">类&nbsp&nbsp&nbsp&nbsp型</td>
      <td height="25" width="232"> 
        <% if (floortype.equals("0")){ %>
        <input type="radio" name="radiobutton" value="0" checked>
	  多层
	  <input type="radio" name="radiobutton" value="1">
      小高层
	   <input type="radio" name="radiobutton" value="2">
       高层
	  <%} else {%>
	         <% if((floortype).equals("1")) { %>
			 <input type="radio" name="radiobutton" value="0" >
	  多层
	  <input type="radio" name="radiobutton" value="1" checked>
      小高层
	   <input type="radio" name="radiobutton" value="2">
       高层
			 <% } else { %>
			  <input type="radio" name="radiobutton" value="0" >
	  多层
	  <input type="radio" name="radiobutton" value="1">
      小高层
	   <input type="radio" name="radiobutton" value="2" checked>
       高层
			  <% } %>
			 <% } %>
        </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">楼&nbsp&nbsp&nbsp&nbsp层</td>
      <td height="25" width="279"> 
        <input type="text" name="floornumb" value="<%=floornumb%>" maxlength="2">
        <font color="#FF3300">*</font> </td>
      <td height="25" align="center" width="113">所属梯口编号</td>
      <td height="25" width="232"><%=doornumb%> 
        <input type="hidden" name="doornumb" value="<%=doornumb%>">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">所属楼宇编号</td>
      <td height="25" width="279"><%=buildingnumb%> 
        <input type="hidden" name="buildingnumb" value="<%=buildingnumb%>">
      </td>
      <td height="25" align="center" width="113">所属分区编号</td>
      <td height="25" width="232"><%=subareanumb%> 
        <input type="hidden" name="subareanumb" value="<%=subareanumb%>">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">用&nbsp&nbsp&nbsp&nbsp途</td>
      <td height="25" width="279"> 
        <input type="text" name="use" value="<%=use%>" maxlength="5">
      </td>
      <td height="25" align="center" width="113">户&nbsp&nbsp&nbsp&nbsp型</td>
      <td height="25" width="232"> 
        <input type="text" name="structure" value="<%=structure%>" maxlength="10">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">建筑面积</td>
      <td height="25" width="279"> 
        <input type="text" name="architecturearea" value="<%=architecturearea%>" maxlength="10">
        平方米</td>
      <td height="25" align="center" width="113">使用面积</td>
      <td height="25" width="232"> 
        <input type="text" name="usingarea" value="<%=usingarea%>" maxlength="10">
        平方米</td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">朝&nbsp&nbsp&nbsp&nbsp向</td>
      <td height="25" width="279"> 
        <input type="text" name="direction" value="<%=direction%>" maxlength="2">
      </td>
      <td height="25" align="center" width="113">居&nbsp住&nbsp间</td>
      <td height="25" width="232"> 
        <input type="text" name="bedroom" value="<%=bedroom%>" maxlength="1">
        个</td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">客&nbsp&nbsp&nbsp&nbsp厅</td>
      <td height="25" width="279"> 
        <input type="text" name="hall" value="<%=hall%>" maxlength="1">
        个</td>
      <td height="25" align="center" width="113">卫&nbsp生&nbsp间</td>
      <td height="25" width="232"> 
        <input type="text" name="loo" value="<%=loo%>" maxlength="1">
        个</td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">厨&nbsp&nbsp&nbsp&nbsp房</td>
      <td height="25" width="279"> 
        <input type="text" name="cookroom" value="<%=cookroom%>" maxlength="1">
        个</td>
      <td height="25" align="center" width="113">阳&nbsp&nbsp&nbsp&nbsp台</td>
      <td height="25" width="232"> 
        <input type="text" name="balcony" value="<%=balcony%>" maxlength="1">
        个</td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="349" height="25" align="center">其他房间</td>
      <td height="25" width="279"> 
        <input type="text" name="elseroom" value="<%=elseroom%>" maxlength="1">

⌨️ 快捷键说明

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