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

📄 index.asp

📁 公交管理系统查询
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<% option explicit %>
<% randomize%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公交车查询系统</title>
<style type="text/css">
body,tr,td {
	text-align: center;
	font-family: 宋体;
	font-size: 13px
}
</style>
<script language="JavaScript">
function do1(){
	if (document.form1.text1.value==""){
		alert("请输入或选择车次!");
	}else{
		//核对查询的车次是否存在,如存在,则索取相应的页面
		busID_search();
	}
}
function do2(){
	if (document.form2.text2.value==""){
		alert("请输入或选择站名!");
	}else{
		//核对查询的站点是否存在,如存在,则索取相应的页面
		busStation_search();
	}
}
function do3(){
	var busStationStartKey=document.form3.text3.value;
	var busStationToKey=document.form3.text4.value;
	var flagStart=false;
	var flagTo=false;
	if (busStationStartKey==""){
		alert("请输入或者选择起点站!");
	}else if(busStationToKey==""){
		alert("请输入或者选择目的站!");
	}else{
		for (ii=0;ii<busStationList.length;ii++){
			if(busStationStartKey==busStationList[ii]){
				flagStart=true;
			}
			if(busStationToKey==busStationList[ii]){
				flagTo=true;
			}
			if (flagStart && flagTo) break;
		}
		if (flagStart && flagTo){
			document.form3.submit();
		}else if(!flagStart && !flagTo){
			alert("抱歉:"+busStationStartKey+" 、"+busStationToKey+" 站不存在");
			document.form3.text3.select();
			//document.form3.text4.select();
		}else if(!flagStart){
			alert("抱歉:"+busStationStartKey+" 站不存在");
			document.form3.text3.select();
		}else if(!flagTo){
			alert("抱歉:"+busStationToKey+" 站不存在");
			document.form3.text4.select();
		}
	}
}
function doChoice(choiceid){
	switch (choiceid){
		case 1:
			var returnBusID=window.showModalDialog("buffer/busIDList.htm?temp="+Math.random(),"","dialogHeight: 350px; dialogWidth: 220px; dialogTop: 300px; dialogLeft: 300px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
			if (returnBusID) document.form1.text1.value=returnBusID;
			break;
		case 2:
			var returnBusState=window.showModalDialog("buffer/busStationList.htm?temp="+Math.random(),"","dialogHeight: 350px; dialogWidth: 280px; dialogTop: 300px; dialogLeft: 300px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
			if (returnBusState) document.form2.text2.value=returnBusState;
			break;
		case 3:
			var returnBusState=window.showModalDialog("buffer/busStationList.htm?temp="+Math.random(),"","dialogHeight: 350px; dialogWidth: 280px; dialogTop: 300px; dialogLeft: 300px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
			if (returnBusState) document.form3.text3.value=returnBusState;
			break;
		case 4:
			var returnBusState=window.showModalDialog("buffer/busStationList.htm?temp="+Math.random(),"","dialogHeight: 350px; dialogWidth: 280px; dialogTop: 300px; dialogLeft: 300px; edge: Raised; center: Yes; help: No; resizable: No; status: No;");
			if (returnBusState) document.form3.text4.value=returnBusState;
			break;
	}
}
function keydown(){
	if(window.event.keyCode==13){
		event.returnValue=false; 
	}
}
function busID_search(){
	var flag=false;
	var busIDKey=document.form1.text1.value;
	for (ii=0;ii<busIDList.length;ii++){
		if(busIDKey==busIDList[ii]){
			flag=true;
			break;
		}
	}
	if (flag){
		window.open("buffer/busIDInfo/bus"+ii+".htm")
	}else{
		alert("抱歉!"+busIDKey+" 车次不存在");
		document.form1.text1.select();
	}
}

function busStation_search(){
	var flag=false;
	var busStationKey=document.form2.text2.value;
	for (jj=0;jj<busStationList.length;jj++){
		if(busStationKey==busStationList[jj]){
			flag=true;
			break;
		}
	}
	if (flag){
		window.open("buffer/busStationInfo/busStation"+jj+".htm")
	}else{
		alert("抱歉!"+busStationKey+" 站不存在");
		document.form2.text2.select();
	}
}
</script>
<!--加一个参数,使浏览器不会读缓冲区数据-->
<script language="JavaScript" src="buffer/data.js?temp=<% = rnd %>"></script>
</head>
<body bgcolor="#FFF9EE" onkeydown="keydown();">
<base target="_blank">
<table width="650" border="0" bgcolor="#003399" cellpadding="3" cellspacing="1" align="center">
  <tr>
    <td height="20" background="images/topbg.gif"></td>
  </tr>
  <tr bgcolor="#7DA4EC"> 
    <td height="20"><div align="left"><font color="#FFFFFF"><strong>◆◆车次查询◆◆ ━━ 
        输入要查询的车次即可查出本车次的停靠站</strong></font></div></td>
  </tr>
  <tr bgcolor="#E8F3FF">
    <td height="60">
		<table width="605" border="0">
        <form name="form1" method="post" action="busId_do.asp">
          <tr>
		    <td width="177"> 请输入或选择车次 </td>
		    <td width="226" valign="top"> 
              <input type="text" name="text1" value="" style="width:220;border: 1px solid #000000;height: 19px;font-size: 13px;" onkeydown="keydown()">
              </td>
			  
            <td width="20"><img  name="img1" src="images/choice.gif" width="20" height="20" border="0" style="CURSOR: hand;" onClick="doChoice(1)"> 
            </td>
		    <td width="164"><img src="images/search.gif" width="60" height="21" border="0" style="CURSOR: hand;" onClick="do1();"> 
            </td>
        </tr>
    </form
		></table>
	</td>
  </tr>
</table>

<table width="650" border="0" bgcolor="#003399" cellpadding="3" cellspacing="1" align="center">
  <tr bgcolor="#7DA4EC"> 
    <td height="20"><div align="left"><font color="#FFFFFF"><strong>◆◆站点查询◆◆ ━━ 
        输入一个站点,就可以查询出经过该站点的所有公交车</strong></font></div></td>
  </tr>
  <tr bgcolor="#E8F3FF">
    <td height="60">
		<table width="610" border="0">
        <form name="form2" method="post" action="busState_do.asp">
          <tr>
		    <td width="180">请输入或选择站名</td>
			<td width="227"><input type="text" value="" name="text2" style="width:220;border: 1px solid #000000;height: 19px;font-size: 13px;" onkeydown="keydown()">
              </td>
            <td width="20"><img name="img2" src="images/choice.gif" width="20" height="20" border="0" style="CURSOR: hand;"  onClick="doChoice(2)"></td>
		    <td width="165"><img src="images/search.gif" width="60" height="21" border="0" style="CURSOR: hand;" onClick="do2();"> 
            </td>
        </tr>
    </form>
		</table>
	</td>
  </tr>
</table>

<table width="650" border="0" bgcolor="#003399" cellpadding="3" cellspacing="1" align="center">
  <tr bgcolor="#7DA4EC"> 
    <td height="20"><div align="left"><font color="#FFFFFF"><strong>◆◆站站查询◆◆ ━━ 
        输入起点站和目的站,就可以查询出经过这两站的直达公交车或者换乘建议</strong></font></div></td>
  </tr>
  <tr bgcolor="#E8F3FF">
    <td height="71">
		<table width="629" border="0">
        <form name="form3" method="post" action="busStationToStation_do.asp">
          <tr>
		    <td width="119">请输入或选择站名 </td>
		    <td width="175">起点 
              <input  value="" type="text" name="text3" style="width:140;border: 1px solid #000000;height: 19px;font-size: 13px;" onkeydown="keydown()">
              </td>
            <td width="20" valign="bottom"> <img name="img3" src="images/choice.gif" width="20" height="20" border="0" style="CURSOR: hand;"  onClick="doChoice(3)"> 
            </td>
            <td width="176">
			  目的 
              <input  value="" type="text" name="text4" style="width:140;border: 1px solid #000000;height: 19px;font-size: 13px;" onkeydown="keydown()">
              </td>
            <td width="20" valign="bottom"> <img name="img4" src="images/choice.gif" width="20" height="20" border="0" style="CURSOR: hand;"  onClick="doChoice(4)"> 
            </td>
		    <td width="93"><img src="images/search.gif" width="60" height="21" border="0" style="CURSOR: hand;" onClick="do3();"> 
            </td>
        </tr>
    </form>
		</table>
	</td>
  </tr>
  <tr bgcolor="#E8F3FF">
    <td height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><a href="admin_login.asp">管理员登录</a></td>
          <td><a href="http://www.zhujh.net/updown/bus.rar">本系统源代码下载</a></td>
          <td><a href="http://www.zhujh.net/guestbk/">给我留言</a></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td height="20" background="images/bottombg.gif"></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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