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

📄 hotelsearch.asp

📁 网上订房
💻 ASP
📖 第 1 页 / 共 2 页
字号:
      <CENTER>
      <P><INPUT height=32 language=javascript name=image1 
      src="02.gif" type=image 
      width=92></P></CENTER></FORM></TD></TR></TBODY></TABLE>


<SCRIPT language=JavaScript>
		<!-- //
			var pricenum,starnum
			pricenum=5
			starnum=6
			function iscbxpricechecked()
			{
				for (i=0;i<pricenum;i++)
				{	
					if (eval("document.ListItemForSale.Price"+i+".checked")) return true 
										
				}
				
				return false
			}
			function cbx_price_clicked(bCheck,sName)
			{
				if (sName != 'PriceAll')
				{
					if (bCheck) document.ListItemForSale.PriceAll.checked = false
					else if (!iscbxpricechecked()) document.ListItemForSale.PriceAll.checked = true
				}
				else
				{
					if(bCheck)
					{
						for (i=0;i<pricenum;i++)
						{
							eval("document.ListItemForSale.Price"+i+".checked = false")
						}
					}
					else if(!iscbxpricechecked())
					{
						alert("没有选择价格范围,默认为“不限”!")
						document.ListItemForSale.PriceAll.checked = true
					}
				}
				return true	
			}
			function iscbxstarchecked()
			{
				for (i=0;i<starnum;i++)
				{
					if (eval("document.ListItemForSale.Star"+i+".checked")) return true
				}
				return false
			}
			function cbx_star_clicked(bCheck,sName)
			{
				if (sName != 'StarAll')
				{
					if (bCheck) document.ListItemForSale.StarAll.checked = false
					else if (!iscbxstarchecked()) document.ListItemForSale.StarAll.checked = true
				}
				else
				{
					if(bCheck)
					{
						for (i=0;i<starnum;i++)
						{
							eval("document.ListItemForSale.Star"+i+".checked = false")
						}
					}
					else if(!iscbxstarchecked())
					{
						alert("没有选择星级,默认为“所有星级”!")
						document.ListItemForSale.StarAll.checked = true
					}
				}
				return true
			}
			
			function searchsubmit(){
					if (document.ListItemForSale.starttime.value.length==0){
						alert("请输入入住时间!");
						document.ListItemForSale.starttime.focus();
						return false
					}	
					if(!isDate(document.ListItemForSale.starttime.value)){
						alert("入住时间不符合格式规范或无效的日期!");
						document.ListItemForSale.starttime.focus();
						return false
					}
					if (stringToDate(document.ListItemForSale.starttime.value,true)<stringToDate(document.ListItemForSale.perdate.value,true)){
						alert("入住时间不能早于"+document.ListItemForSale.perdate.value+"!");
						document.ListItemForSale.starttime.focus();
						return false
					}
					if (stringToDate(document.ListItemForSale.starttime.value,true)>=stringToDate(document.ListItemForSale.postdate.value,true)){
						alert("入住时间不能晚于或等于"+document.ListItemForSale.postdate.value+"!");
						document.ListItemForSale.starttime.focus();
						return false
					}
					if (document.ListItemForSale.deptime.value.length==0){
						alert("请输入离店时间!");
						document.ListItemForSale.deptime.focus();
						return false
					}	
					if(!isDate(document.ListItemForSale.deptime.value)){
						alert("离店时间不符合格式规范或无效的日期!");
						document.ListItemForSale.deptime.focus();
						return false
					}
					if (stringToDate(document.ListItemForSale.deptime.value,true)<=stringToDate(document.ListItemForSale.starttime.value,true)){
						alert("离店时间不能早于或等于入住时间"+document.ListItemForSale.starttime.value+"!");
						document.ListItemForSale.deptime.focus();
						return false
					}
					if (stringToDate(document.ListItemForSale.deptime.value,true)>stringToDate(document.ListItemForSale.postdate.value,true)){
						alert("离店时间不能晚于"+document.ListItemForSale.postdate.value+"!");
						document.ListItemForSale.deptime.focus();
						return false
					}
					if ((stringToDate(document.ListItemForSale.deptime.value,true)-stringToDate(document.ListItemForSale.starttime.value,true))>2419200000)
					{
						alert("入住时间段不能超过28天!");
						document.ListItemForSale.deptime.focus();
						return false
					}
					return true
				} 
				function onsubmit1(sPr)
				{
					//check for date validity
					if(!searchsubmit()) return false
					//
					if(!search_onclick()) return false
					
					//if (sPr!="1") changeprice();	
					//changeprice(); //del by xmding 01-10-14
					
					return true 					
				}
				
				function changeprice()
				{
					if (document.ListItemForSale.SearchPrice[0].checked)
					{
						document.ListItemForSale.Price0.value="r.WD_FGprice > 0 and r.WD_FGprice <= 250";
						document.ListItemForSale.Price1.value="r.WD_FGprice >= 250 and r.WD_FGprice<= 400";
						document.ListItemForSale.Price2.value="r.WD_FGprice >= 400 and r.WD_FGprice<= 600";
						document.ListItemForSale.Price3.value="r.WD_FGprice >= 600 and r.WD_FGprice<= 800";
						document.ListItemForSale.Price4.value="r.WD_FGprice >= 800";
					}
					else
					{
						document.ListItemForSale.Price0.value="r.WD_PPprice > 0 and r.WD_PPprice <= 250";
						document.ListItemForSale.Price1.value="r.WD_PPprice >= 250 and r.WD_PPprice<= 400";
						document.ListItemForSale.Price2.value="r.WD_PPprice >= 400 and r.WD_PPprice<= 600";
						document.ListItemForSale.Price3.value="r.WD_PPprice >= 600 and r.WD_PPprice<= 800";
						document.ListItemForSale.Price4.value="r.WD_PPprice >= 800";
					}	
				}
				//-->
	</SCRIPT>

<SCRIPT language=JavaScript>
	<!-- the message below will display only on non-js1.1 browsrs -->
	<!-- --> <hr><h1>This page requires JavaScript 1.1</h1>
	<!-- --> Please consider using Netscape 3.0/4.0 or Internet Explorer 4.0
	<!-- This HTML comment hides the script from non-js1.1 browsers
	// gather all the catmenus on the page into an array
	catmenu = new Array;j = 0;
	for (i = 0; i < document.ListItemForSale.elements.length; i++)
	{if (document.ListItemForSale.elements[i].name.indexOf("catmenu") != -1) 
		catmenu[j++] = document.ListItemForSale.elements[i];
	}
	changemenu(-1);
	for (i = 0; i < document.ListItemForSale.catmenu_0.length; i++)
	{	if (document.ListItemForSale.catmenu_0.options[i].value == document.ListItemForSale.province.value)
		{	document.ListItemForSale.catmenu_0.selectedIndex = i;
			changemenu(0);break;
			}
	}
	// This JS comment is also at the end of the HTML comment above -->
/*
	if (document.ListItemForSale.cityename1.value!="")
	{	changecityename();
		document.ListItemForSale.cityename.focus();
		document.ListItemForSale.cityename.value = document.ListItemForSale.cityename1.value;
	}
*/
	</SCRIPT>
<BR>
</BODY></HTML>

⌨️ 快捷键说明

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