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

📄 flight.js

📁 机票预定系统 各个模块的设计-ticket reservation systems detailed design system modules of the design
💻 JS
字号:
// 加载页面时,根据国内航程类型判定行程选择框所在单元是否显示
// 传入fly_type所在form的名称;
//只显示最低价
var FLIGHT_REQUEST_ONLYLOWPRICE  ="只显示最低价  ";
//显示全部
var FLIGHT_REQUEST_ALLPRICE      ="显示全部  ";
function hiddenHeighterPrice(tableName,tableRow,linkName, linkMapName )
{
	
	var n = document.getElementById(tableName).rows.length;
	var show = 0;
	tableRowIndex=tableRow-1;
	
	var nn = 0;
	if ( tableRow < n )
	{
		nn = tableRow;
	}
	else
	{
		nn = 1;
	}
	
	var agent = navigator.userAgent.toLowerCase();
	var ie = (agent.indexOf("msie") != -1);

	if ( n >= 1 )
	{
	

		var Display= '';
		for(i=0;i<=document.getElementById(tableName).rows.length-1;i++)
		{
			if ( i<nn )
			{
				if ( ie )
				{
					Display='block';
		
				}
				else
				{
					Display='table-row';
				}
			}
			else
			{
				if(document.getElementById(tableName).rows[i].style.display=="none")
				{
					if ( ie )
					{
						Display='block';
			
					}
					else
					{
						Display='table-row';
					}
					show = 1;
				}
				else
				{
					Display="none";
					show = 0;
				}
			}
			document.getElementById(tableName).rows[i].style.display=Display;
		}
		
		if ( show == 1 )
		{
			document.getElementById( linkName ).innerHTML = FLIGHT_REQUEST_ONLYLOWPRICE;
			document.getElementById( linkMapName ).src = "smallPic/show_low_price.gif";
		}
		else
		{
			document.getElementById( linkName ).innerHTML =FLIGHT_REQUEST_ALLPRICE;
			document.getElementById( linkMapName ).src = "smallPic/show_all_price.gif";				
		}
		
	}
}


function addAirLineToSelect(airLineCode,airLineCodeGif){
    
	try{
    var linkStr = "";
    //alert('fdfdfed');
    airLineCode = airLineCode.split(",");
    airLineCodeGif = airLineCodeGif.split(",");
    var e = document.getElementById("airLineCodeList");
    for (i=0; i<airLineCode.length; i++){
    	if (airLineCode[i] != "")
    	  linkStr += "<a href='javascript:showAirLine(\""+airLineCode[i]+"\")'><img align='absmiddle' border=0 src='smallPic/"+ airLineCodeGif[i] +"1.gif'  alt='"+airLineCode[i]+"'></a>&nbsp;";
    	  //e.options[e.options.length] = new Option(airLineCode[i], airLineCode[i], 0, 0);
    }
    
    linkStr += "<a href='javascript:showAirLine(\"all\")'><img align='absmiddle' border=0 src='smallPic/entirely1.gif'  alt='显示全部航空公司'></a>&nbsp;";
    linkStr += "<a href='javascript:showAirLine(\"eticket\")'><img align='absmiddle' border=0 src='smallPic/eticket1.gif'  alt='显示全部航电子票'></a>&nbsp;";
    e.innerHTML = linkStr;
    }catch(e){}
  }
  //addAirLineToSelect('联合航空公司,深圳航空公司,中国东方航空公司,中国国际航空公司,中国海南航空公司,中国南方航空公司,中国四川航空公司','ZH,ZH,MU,CA,CA,CZ,CZ');
  //addAirLineToSelect(<%StrairLineCode%>,<%airLineCodeGif%>);
 /* function showAirLine(para){
    var maxTblNo = <%=airflightCount%> * 1 + 1;
	alert(maxTblNo);
    var e = document.getElementById("airLineCodeList");
    if (para == "all"){
    	for (i=0;i<maxTblNo; i++){
    	  var oa = document.getElementById("spAirLine"+i);
    	  if (oa != null )
    	    oa.style.display = "block";
    	}
    }
    else if(para == 'eticket'){

	for (i=0;i<maxTblNo; i++){
	  var oa = document.getElementById("spAirLine"+i);

	  if (oa != null )

	    if (oa.eticket == 'true'){
	      oa.style.display = "block";
		  //alert(oa);
	    }
	    else{
	      oa.style.display = "none";
	    }
	}
    }
    else{
	for (i=0;i<maxTblNo; i++){
	  var oa = document.getElementById("spAirLine"+i);
	  if (oa != null )
	    if (oa.airCode == para){
	      oa.style.display = "block";
	    }
	    else{
	      oa.style.display = "none";
	    }
	}
    }
  }*/

 function expandAll(para,myTempCount){
    var maxTblNo = myTempCount * 1 + 1;
    var e = document.getElementById("airLineCodeList");
    for (i=0; i<maxTblNo; i++){
      var oa = document.getElementById("spAirLine"+i);
      if (oa != null){
        var tblObj = document.getElementById("pricelist"+i);
        for (j=0; j<tblObj.rows.length; j++){
          if (para == 0){
          	tblObj.rows[j].style.display = "block";
          }
          else{
          	tblObj.rows[j].style.display = "none";
          }
          var tblbtnObj = document.getElementById("tblbtn"+i);
        }

         /* if (tblbtnObj != null){
          try{
          tblbtnObj = tblbtnObj.childNodes(0).childNodes(0).childNodes(0);
         // tblbtnObj.childNodes(0).src = tblbtnObj.childNodes(0).src == "smallPic/niu3.gif" ? "smallPic/n/niu4.gif":"smallPic/niu3.gif";
          tblbtnObj = tblbtnObj.nextSibling.childNodes(0);
          }catch(e){}*/
	  /* var str = tblbtnObj.innerHTML;
	    if( str.indexOf("显示全")>=0){
	      tblbtnObj.innerHTML = "&nbsp;显示最低舱位";
	      tblbtnObj.alt = "显示最低舱位";
	      tblbtnObj.title = "显示最低舱位";
	    }
	    else{
	      tblbtnObj.innerHTML = "&nbsp;显示全部舱位";
	      tblbtnObj.alt = "显示全部舱位";
	      tblbtnObj.title = "显示全部舱位";
	    }
	 }*/
if (para == 0){
		 try{
			document.getElementById( 'showlink'+(i+1) ).innerHTML = FLIGHT_REQUEST_ONLYLOWPRICE;
			document.getElementById( 'showimg'+(i+1) ).src = "smallPic/show_low_price.gif";
			 }catch(e){}
		}
		else
		{
			try{
			document.getElementById( 'showlink'+(i+1) ).innerHTML =FLIGHT_REQUEST_ALLPRICE;
			document.getElementById( 'showimg'+(i+1) ).src = "smallPic/show_all_price.gif";	
			 }catch(e){}
		}
      } 
    }
 }
   /* if(para==0){
      document.getElementById("expA").src = "smallPic/radchk.gif";
      document.getElementById("expB").src = "smallPic/radunchk.gif";
    }
    else{
      document.getElementById("expA").src = "smallPic/radunchk.gif";
      document.getElementById("expB").src = "smallPic/radchk.gif";
    }
    
     try{
	      var ss= "mytr01,mytr11,mytr21,mytr32,mytr41,mytr51,mytr62,mytr71,mytr81,mytr92,mytr100,mytr111,mytr121,mytr131,mytr141,mytr151,mytr161,mytr171,mytr181,mytr191,mytr201,";
	      ss = ss.split(",");
	      for(n=0; n<ss.length-1; n++){
	        var o = document.getElementById(ss[n]);
	        if(o !=null)
	          o.style.display = "block";
	      }
     }catch(e){}*/


⌨️ 快捷键说明

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