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

📄 modifysubareainput.jsp

📁 JSP物业管理系统 一份比较完整的物业管理系统源码。 对于初学者可以有一定的借鉴。
💻 JSP
📖 第 1 页 / 共 2 页
字号:
        	alert("输入的出租率不正确");  
		    inputForm.hirerate.select();
            return false;
	    }
	    if (inputForm.hirerate.value>100) {
	    	alert("出租率必须小于100%!");     
            inputForm.hirerate.select();
            return false;
	    }
	    
    }
   
    if (inputForm.salerate.value!="") {
        var len=0;
        for (i=0;i<inputForm.salerate.value.length;i++) {
            if (inputForm.salerate.value.charAt(i)=='.')
                len++;
        }
        if (len==1) {
            if (inputForm.salerate.value.length<2) {  
                alert("输入的出售率不正确"); 
                inputForm.salerate.select();
                return false;
            }   
        	var ss = inputForm.salerate.value;
        	var subLen = ss.substring(ss.indexOf(".")+1);//得到小数点后面的位数
        	
        	if (subLen.length>2) {
        		alert("输入的出售率不正确,小数点后最多只有两位!"); 
                inputForm.salerate.select();
                return false;
        	}
        	
        }
        if (len>1) {
            alert("输入的出售率不正确");     
            inputForm.salerate.select();
            return false;
        }      
        if (Chkhirerate(inputForm.salerate.value)==false) {
        	alert("输入的出售率不正确");
		    inputForm.salerate.select();
            return false;
	    }
	    if (inputForm.salerate.value>100) {
	    	alert("出售率必须小于100%!");     
            inputForm.salerate.select();
            return false;
	    }
	    
    }
    if (inputForm.firefighting.value.length>20){
        alert("消防情况不能超过20个字");
        inputForm.firefighting.focus();
        return false;
    }
    if (inputForm.security.value.length>20){
        alert("保安情况不能超过20个字");
        inputForm.security.focus();
        return false;
    }
    if (inputForm.remark.value.length>100){
        alert("备注不能超过100个字");
        inputForm.remark.focus();
        return false;
    }
    
	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="510" 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="510" 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)+'"></td><td width="40%"><input id="describe' + (linenumber + 1) + '" name="describe' + (linenumber + 1) + '" type="text" size="31"></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>
</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="2016">
  <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="308" border="1"  align="center" bgcolor="#FFFFFF" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" height="22">
  <tr>
      <td align="center" bgcolor="#eeffee">修改分区资料</td>
  </tr>
</table><br>
  <table border="1"  align="center" bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" width="99%">
    <input type="hidden" name="orisubareanumb" value="<%=subareanumb%>">
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">分区编号</td>
      <td height="25" width="35%"> 
        <input type="text" name="subareanumb" value="<%=subareanumb%>" size="30">
        <font color="#FF3300">*</font> </td>
      <td height="25" align="center" width="15%">分区名称</td>
      <td height="25" width="35%"> 
        <input type="text" name="subareaname" value="<%=subareaname%>" maxlength="5">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">分区简介</td>
      <td height="25" colspan="3"> 
        <textarea name="subareadescribe" rows="6" cols="85"><%=subareadescribe%></textarea>
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">公交路线</td>
      <td height="25" colspan="3"> 
      	<input type="text" name="path" value="<%=path%>" size="60" maxlength="25">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">公用设施</td>
      <td colspan="3" height="25"> 
        <textarea name="publicservice" rows="2" cols="85"><%=publicservice%></textarea>
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">出&nbsp;租&nbsp;率</td>
      <td height="25" width="35%"> 
        <input type="text" name="hirerate" value="<%=hirerate%>" maxlength="5">
        % </td>
      <td height="25" align="center" width="15%">出&nbsp;售&nbsp;率</td>
      <td height="25" width="35%"> 
        <input type="text" name="salerate" value="<%=salerate%>" maxlength="5">
        % </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">消防情况</td>
      <td height="25" colspan="3"> 
        <input type="text" name="firefighting" value="<%=firefighting%>" size="40" maxlength="20">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">保安情况</td>
      <td height="25" colspan="3"> 
        <input type="text" name="security" value="<%=security%>" size="40" maxlength="20">
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="25" align="center">备&nbsp;&nbsp;&nbsp;&nbsp;注</td>
      <td colspan="3" height="25"> 
        <textarea name="remark" rows="4" cols="85"><%=remark%></textarea>
      </td>
    </tr>
    <tr bgcolor="#d4d0c8"> 
      <td width="15%" height="17" align="center">小区图片</td>
      <td height="17" colspan="3" align="center" > 
        <%if(filesize!=0){%>
        <table width="100%" border="1"  bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">
          <%for(int i=0;i<filesize;i++){%>
          <tr id="pic<%=i%>"> 
            <input type="hidden" id="curhide<%=(i)%>" name="curhide<%=(i)%>" value="11">
            <input type="hidden" name="filenum<%=(i)%>" id="filenum<%=(i)%>" value="<%=(String)request.getParameter("num"+i)%>">
            <td align="center" width="42%"><a href="/baseinfo/ModifySubAreaInput.jsp" onClick="JustSoPicWindow('<%=(String)request.getParameter("file"+i)%>','436','387','图片','#d4d0c8','hug image')">观赏图片</a></td>
            <td width="29"> 
              <input type="text" name="picdescribe<%=(i)%>" value="<%=(String)request.getParameter("picdescribe"+i)%>">
              &nbsp;</td>
            <td width="14%" align="center" height="10"> 修改 
              <input type="file" name="browser<%=i%>" size="10">
            </td>
            <td width="15%" align="center" height="10"> 
              <input type="button" name="delete<%=i%>" value="删除" onclick="DelCurren(<%=(i)%>)">
            </td>
          </tr>
          <%}%>
        </table>
        <%}else{%>
        目前没有任何分区图片 
        <%}%>
        <table id="tb0" width="100%" >
          <tr> 
            <td></td>
            <td></td>
            <td></td>
          </tr>
        </table>
        <input type="button" name="addfile" value="增加分区图片" onclick="InsertLine()">
      </td>
    </tr>
  </table><br>
  <table width="200" border="1"  align="center" bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="2">
    <tr> 
      <td align="center"><a style="cursor:hand" onclick="CheckForm(form1)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image91','','/pmsApp/images/button_save_over.gif',1)"><img name="Image91" border="0" src="/pmsApp/images/button_save.gif" width="55" height="20" ></a><a href="javascript:history.back()"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','/pmsApp/images/button_cancel_over.gif',1)"><img name="Image2" border="0" src="/pmsApp/images/button_cancel.gif" width="55" height="20"></a></td>
    </tr>
  </table>
</form>
 
</body>
</html>

⌨️ 快捷键说明

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