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

📄 cityto.asp

📁 是个不错的文件代码,希望大家好好用,
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Inc/Config.asp"-->
<% MenuID=3 : OpenDB = True : Title = "通过 地名 的查询结果 - " & SiteName %>
<!--#include file="Inc/Menus.asp"-->
<!--#include file="Inc/Function.asp"-->
<br>
<!-------------------------------------------------------------------------->
<script language="javascript">
	function CopyContent(Obj,MsgObj) 
	{
		window.clipboardData.setData("text", Obj.value);
		MsgObj.innerHTML="<font color='#CC5200'>复制成功</font>";
	}
</script>
<%
Dim Word,Rs,SQL,I,Msg_All
Word = Trim(Request.Form("City"))
If Len(Word)<2 Then
	Response.Write("<center><br> <br>请先输入关键字(最少两个字)!<br> <br><a href=""Javascript:history.back();"">点击返回</a><br></center>")
Else
	Call AddSearch(Word,8)'写入查询记录
%>
<table width="680" height="30"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr onmousemove=this.style.backgroundColor='#EEEEEE'; onmouseout=this.style.backgroundColor='';>
	<td width="65" align="center" style="font-size:14px;"><strong>区 号</strong></td>
	<td width="101" align="center" style="font-size:14px;"><strong>邮 编</strong></td>
	<td width="150" style="font-size:14px;">&nbsp; &nbsp; <strong>省份</strong></td>
	<td width="249" style="font-size:14px;"><strong>城市</strong></td>
	<td width="57"><Span id="CopyMsg_All" align="center"></Span></td>
	<td style="font-size:14px;" width="58" align="center"><a href="#NOURL" onClick="CopyContent(Content_All,CopyMsg_All)"><span style="color:Green;">全部复制</span></a></td>
  </tr>
</table>
<%
	Set Rs=Server.CreateObject("ADODB.RecordSet")
	If (Len(Word)=3 Or Len(Word)=4) And IsNumeric(Word) Then
		SQL="Select Top 500 * From City Where [DHQH] = "&Word&" Order By YZBM"
	Elseif Len(Word)=6 And IsNumeric(Word) Then
		SQL="Select Top 500 * From City Where [YZBM] = "&Word&" Order By YZBM"
	Else
		SQL="Select Top 500 * From City Where [DC] Like '%"&Word&"%' Or [Province] Like '%"&Word&"%' Order By YZBM"
	End If
	Rs.Open SQL,Conn
	If Rs.Eof Then
		Response.Write("<center><br> <br>没有找到包含“<strong style='Color:Red;'>"&Word&"</strong>”的数据!<br> <br><a href=""Javascript:history.back();"">点击返回</a><br></center>")
	Else
		'-----------------------------
		I = 0
		Msg_All = ""
		Do While Not Rs.Eof
		%>
			<table width="680" height="30"  border="0" align="center" cellpadding="0" cellspacing="0">
			  <tr onmousemove=this.style.backgroundColor='#EEEEEE'; onmouseout=this.style.backgroundColor='';>
				<td width="65" align="center" style="font-size:14px;font-family:黑体;"><strong><%= Rs("DHQH") %></strong></td>
				<td width="102" align="center"><strong><%= Rs("YZBM") %></strong></td>
				<td width="150" style="font-size:14px;">&nbsp; &nbsp; <%=Rs("Province")%></td>
				<td width="248" style="font-size:14px;"><%= Rs("DC") %></td>
				<td width="57"><Span id="CopyMsg_<%=I%>" align="center"></Span></td>
				<td style="font-size:14px;" width="58" align="center"><a href="#NOURL" onClick="CopyContent(Content_<%=I%>,CopyMsg_<%=I%>)"><span style="color:Green;">复制</span></a></td>
			  </tr>
			</table>
			<input type="hidden" name="Content" ID="Content_<%=I%>" value="<%=Rs("Province")&"/"&Rs("DC")&"  邮编:"&Rs("YZBM")&"  区号:"&Rs("DHQH")%>">
			<%
			I = I+1
			Msg_All = Msg_All & Rs("Province")&"/"&Rs("DC")&"  邮编:"&Rs("YZBM")&"  区号:"&Rs("DHQH") & Chr(13) & Chr(10)
			Rs.MoveNext
		Loop
		'-----------------------------
		Rs.Close
		Set Rs=Nothing
	End If
End If	'是否未输入数据?
%>
<input type="hidden" name="Content" ID="Content_All" value="<%=Msg_All%>">
<!-------------------------------------------------------------------------->
<br>&nbsp;<br>
<!--#include file="Inc/Bottom.asp"-->

⌨️ 快捷键说明

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