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

📄 common.js

📁 就业管理系统 源代码 可以运行 没有错误
💻 JS
📖 第 1 页 / 共 3 页
字号:
	}
	if(document.form1.saleaddress.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写销售地址!");
		document.form1.saleaddress.focus();
		return false;
	}
	if(document.form1.housetype.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.housetype.value=="请选择")
	{
		alert("请选择楼盘类型!");
		document.form1.housetype.focus();
		return false;
	}
	if(document.form1.construct.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.construct.value=="请选择")
	{
		alert("请选择楼盘结构!");
		document.form1.construct.focus();
		return false;
	}
	if(document.form1.smianji.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写楼盘面积!");
		document.form1.smianji.focus();
		return false;
	}
	if(document.form1.emianji.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写楼盘面积!");
		document.form1.emianji.focus();
		return false;
	}
	if(document.form1.sceng.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写楼盘层数!");
		document.form1.sceng.focus();
		return false;
	}
	if(document.form1.eceng.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写楼盘层数!");
		document.form1.eceng.focus();
		return false;
	}
	if(document.form1.sprice.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写楼盘价格!");
		document.form1.sprice.focus();
		return false;
	}
	if(document.form1.eprice.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写楼盘价格!");
		document.form1.eprice.focus();
		return false;
	}
	if(document.form1.intro.value.replace(/\s+$|^\s+/g,"").length>200)
	{
		alert("楼盘简介填写请限制在200字以内!");
		document.form1.intro.focus();
		return false;
	}
	if(document.form1.linkman.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写联系人!");
		document.form1.linkman.focus();
		return false;
	}
	if(document.form1.widetel.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写电话区号!");
		document.form1.widetel.focus();
		return false;
	}
	if(document.form1.tel.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写电话号码!");
		document.form1.tel.focus();
		return false;
	}
	if(document.form1.handset.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写手机号码!");
		document.form1.handset.focus();
		return false;
	}
	if(document.form1.befortime.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写有效期!");
		document.form1.befortime.focus();
		return false;
	}
	if(document.form1.file_1.value.replace(/\s+$|^\s+/g,"").length>0)
	{
		var fileext=form1.file_1.value.substring(form1.file_1.value.length-4,form1.file_1.value.length); 
		fileext=fileext.toLowerCase(); 
		if(!(fileext=='.jpg')&&!(fileext=='.gif')) 
		{
			alert("对不起,文件格式不对,必须为jpg或gif格式文件!"); 
			form1.file_1.focus(); 
			return false; 
		} 
		/**
		var filestr = document.form1.file_1.value;
	 	var fso,f; 
	 	fso=new ActiveXObject("Scripting.FileSystemObject");  
	 	f=fso.GetFile(filestr); 
	 	if(f.size>500*1024)
	 	{
	 		alert("对不起,图片过大(500K以上),请裁剪后再上传!"); 
	 		form1.file_1.focus(); 
	 		return false;
	 	}
	 	*/
	 	if(document.form1.description_1.value.replace(/\s+$|^\s+/g,"").length<=0)
	 	{
			alert("请填写图片说明!"); 
			form1.description_1.focus(); 
			return false; 
		} 
	}
	if(document.form1.file_2.value.replace(/\s+$|^\s+/g,"").length>0)
	{
		var fileext=form1.file_2.value.substring(form1.file_2.value.length-4,form1.file_2.value.length); 
		fileext=fileext.toLowerCase(); 
		if(!(fileext=='.jpg')&&!(fileext=='.gif')) 
		{
			alert("对不起,文件格式不对,必须为jpg或gif格式文件!"); 
			form1.file_2.focus(); 
			return false; 
		} 
		/**
		var filestr = document.form1.file_1.value;
	 	var fso,f; 
	 	fso=new ActiveXObject("Scripting.FileSystemObject");  
	 	f=fso.GetFile(filestr); 
	 	if(f.size>500*1024)
	 	{
	 		alert("对不起,图片过大(500K以上),请裁剪后再上传!"); 
	 		form1.file_1.focus(); 
	 		return false;
	 	}
	 	*/
	 	if(document.form1.description_2.value.replace(/\s+$|^\s+/g,"").length<=0)
	 	{
			alert("请填写图片说明!"); 
			form1.description_2.focus(); 
			return false; 
		} 
	}
	if(document.form1.file_3.value.replace(/\s+$|^\s+/g,"").length>0)
	{
		var fileext=form1.file_3.value.substring(form1.file_3.value.length-4,form1.file_3.value.length); 
		fileext=fileext.toLowerCase(); 
		if(!(fileext=='.jpg')&&!(fileext=='.gif')) 
		{
			alert("对不起,文件格式不对,必须为jpg或gif格式文件!"); 
			form1.file_3.focus(); 
			return false; 
		} 
		/**
		var filestr = document.form1.file_1.value;
	 	var fso,f; 
	 	fso=new ActiveXObject("Scripting.FileSystemObject");  
	 	f=fso.GetFile(filestr); 
	 	if(f.size>500*1024)
	 	{
	 		alert("对不起,图片过大(500K以上),请裁剪后再上传!"); 
	 		form1.file_1.focus(); 
	 		return false;
	 	}
	 	*/
	 	if(document.form1.description_3.value.replace(/\s+$|^\s+/g,"").length<=0)
	 	{
			alert("请填写图片说明!"); 
			form1.description_3.focus(); 
			return false; 
		} 
	}
}
 
//验证出租房屋信息数据
function checkrentout()
{
	if(document.form1.place.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.place.value=="请选择")
	{
		alert("请选择房产所在方位!");
		document.form1.place.focus();
		return false;
	}
	if(document.form1.wide.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写房产所在小区或地段!");
		document.form1.wide.focus();
		return false;
	}
	if(document.form1.address.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写房产详细地址!");
		document.form1.address.focus();
		return false;
	}
	if(document.form1.housetype.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.housetype.value=="请选择")
	{
		alert("请选择房产类型!");
		document.form1.housetype.focus();
		return false;
	}
	if(document.form1.roomtype.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.roomtype.value=="请选择")
	{
		alert("请选择房产户型!");
		document.form1.roomtype.focus();
		return false;
	}
	if(document.form1.ceng.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写所在楼层!");
		document.form1.ceng.focus();
		return false;
	}
	if(document.form1.build.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.build.value=="请选择")
	{
		alert("请选择装修程度!");
		document.form1.build.focus();
		return false;
	}
	if(document.form1.buildsam.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写建筑面积!");
		document.form1.buildsam.focus();
		return false;
	}
	if(document.form1.usesam.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写使用面积!");
		document.form1.usesam.focus();
		return false;
	}
	if(document.form1.renttime.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写租期!");
		document.form1.renttime.focus();
		return false;
	}
	if(document.form1.rentmoney.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写租金!");
		document.form1.rentmoney.focus();
		return false;
	}
	if(document.form1.promoney.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写租房押金!");
		document.form1.promoney.focus();
		return false;
	}
	if(document.form1.intro.value.replace(/\s+$|^\s+/g,"").length>200)
	{
		alert("房屋简介填写请限制在200字以内!");
		document.form1.intro.focus();
		return false;
	}
	if(document.form1.linkman.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写联系人!");
		document.form1.linkman.focus();
		return false;
	}
	if(document.form1.widetel.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写电话区号!");
		document.form1.widetel.focus();
		return false;
	}
	if(document.form1.tel.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写电话号码!");
		document.form1.tel.focus();
		return false;
	}
	if(document.form1.handset.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写手机号码!");
		document.form1.handset.focus();
		return false;
	}
	if(document.form1.befortime.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写有效期!");
		document.form1.befortime.focus();
		return false;
	}
	if(document.form1.file_1.value.replace(/\s+$|^\s+/g,"").length>0)
	{
		var fileext=form1.file_1.value.substring(form1.file_1.value.length-4,form1.file_1.value.length); 
		fileext=fileext.toLowerCase(); 
		if(!(fileext=='.jpg')&&!(fileext=='.gif')) 
		{
			alert("对不起,文件格式不对,必须为jpg或gif格式文件!"); 
			form1.file_1.focus(); 
			return false; 
		} 
		/**
		var filestr = document.form1.file_1.value;
	 	var fso,f; 
	 	fso=new ActiveXObject("Scripting.FileSystemObject");  
	 	f=fso.GetFile(filestr); 
	 	if(f.size>500*1024)
	 	{
	 		alert("对不起,图片过大(500K以上),请裁剪后再上传!"); 
	 		form1.file_1.focus(); 
	 		return false;
	 	}
	 	*/
	 	if(document.form1.description_1.value.replace(/\s+$|^\s+/g,"").length<=0)
	 	{
			alert("请填写图片说明!"); 
			form1.description_1.focus(); 
			return false; 
		} 
	}
	if(document.form1.file_2.value.replace(/\s+$|^\s+/g,"").length>0)
	{
		var fileext=form1.file_2.value.substring(form1.file_2.value.length-4,form1.file_2.value.length); 
		fileext=fileext.toLowerCase(); 
		if(!(fileext=='.jpg')&&!(fileext=='.gif')) 
		{
			alert("对不起,文件格式不对,必须为jpg或gif格式文件!"); 
			form1.file_2.focus(); 
			return false; 
		} 
		/**
		var filestr = document.form1.file_1.value;
	 	var fso,f; 
	 	fso=new ActiveXObject("Scripting.FileSystemObject");  
	 	f=fso.GetFile(filestr); 
	 	if(f.size>500*1024)
	 	{
	 		alert("对不起,图片过大(500K以上),请裁剪后再上传!"); 
	 		form1.file_1.focus(); 
	 		return false;
	 	}
	 	*/
	 	if(document.form1.description_2.value.replace(/\s+$|^\s+/g,"").length<=0)
	 	{
			alert("请填写图片说明!"); 
			form1.description_2.focus(); 
			return false; 
		} 
	}
	if(document.form1.file_3.value.replace(/\s+$|^\s+/g,"").length>0)
	{
		var fileext=form1.file_3.value.substring(form1.file_3.value.length-4,form1.file_3.value.length); 
		fileext=fileext.toLowerCase(); 
		if(!(fileext=='.jpg')&&!(fileext=='.gif')) 
		{
			alert("对不起,文件格式不对,必须为jpg或gif格式文件!"); 
			form1.file_3.focus(); 
			return false; 
		} 
		/**
		var filestr = document.form1.file_1.value;
	 	var fso,f; 
	 	fso=new ActiveXObject("Scripting.FileSystemObject");  
	 	f=fso.GetFile(filestr); 
	 	if(f.size>500*1024)
	 	{
	 		alert("对不起,图片过大(500K以上),请裁剪后再上传!"); 
	 		form1.file_1.focus(); 
	 		return false;
	 	}
	 	*/
	 	if(document.form1.description_3.value.replace(/\s+$|^\s+/g,"").length<=0)
	 	{
			alert("请填写图片说明!"); 
			form1.description_3.focus(); 
			return false; 
		} 
	}
}
//验证求租房屋信息数据
function checkrentinhouse()
{
	if(document.form1.place.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.place.value=="请选择")
	{
		alert("请选择房产所在方位!");
		document.form1.place.focus();
		return false;
	}
	if(document.form1.wide.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写房产所在小区或地段!");
		document.form1.wide.focus();
		return false;
	}
	if(document.form1.address.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写房产详细地址!");
		document.form1.address.focus();
		return false;
	}
	if(document.form1.housetype.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.housetype.value=="请选择")
	{
		alert("请选择房产类型!");
		document.form1.housetype.focus();
		return false;
	}
	if(document.form1.roomtype.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.roomtype.value=="请选择")
	{
		alert("请选择房产户型!");
		document.form1.roomtype.focus();
		return false;
	}
	if(document.form1.sceng.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写求租楼层!");
		document.form1.sceng.focus();
		return false;
	}
	if(document.form1.eceng.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写求租楼层!");
		document.form1.eceng.focus();
		return false;
	}
	if(document.form1.ssam.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写求租面积!");
		document.form1.ssam.focus();
		return false;
	}
	if(document.form1.esam.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写求租面积!");
		document.form1.esam.focus();
		return false;
	}
	if(document.form1.build.value.replace(/\s+$|^\s+/g,"").length<=0||document.form1.build.value=="请选择")
	{
		alert("请选择装修程度!");
		document.form1.build.focus();
		return false;
	}
	if(document.form1.renttime.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写租期!");
		document.form1.renttime.focus();
		return false;
	}
	if(document.form1.rentmoney.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请填写租金!");
		document.form1.rentmoney.focus();
		return false;
	}
	if(document.form1.livetime.value.replace(/\s+$|^\s+/g,"").length<=0)
	{
		alert("请选择入住时间!");
		return false;
	}
	if(document.form1.otherneed.value.replace(/\s+$|^\s+/g,"").length>200)
	{
		alert("其他要求填写请限制在200字以内!");

⌨️ 快捷键说明

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