<% youbian=trim(request("youbian")) if youbian<>"" then if len(youbian)<2 then mess="请正确输入邮编/地区!" else isyoubian=1 if len(youbian)=6 then for i=1 to 5 if instr("0123456789",cstr(mid(cstr(youbian),i,1)))<1 then isyoubian=0 end if next else isyoubian=0 end if if isyoubian=1 then rs.open " select * from city where yzbm='"& youbian &"'",conn,1,1 if rs.bof or rs.eof then mess="没有你要查的邮编!" else mier_youbian=youbian mier_dq=rs("dc") end if rs.close else if right(youbian,1)="省" or right(youbian,1)="市" or right(youbian,1)="县" or right(youbian,1)="区" then youbian=left(youbian,len(youbian)-1) end if rs.open " select * from city where PROVINCE = '"& youbian &"'",conn,1,1 if rs.bof or rs.eof then rs.close rs.open " select * from city where dc = '"& youbian &"' ",conn,1,1 if rs.bof or rs.eof then mess="没有找到你要查找的地区!" else mier_youbian=rs("yzbm") mier_dq=rs("dc") end if rs.close else do if rs.bof or rs.eof then exit do else if youbian<>rs("PROVINCE") then exit do end if mier_dq=mier_dq&rs("dc")&"  "&rs("yzbm")&"
" rs.movenext end if loop rs.close end if end if end if end if %>
当前位置 >> 千年阳光健康生活网 >> 健康生活实用查询 >> 邮政编码查询
   邮编查询  
 
 
请输入邮编/地名:
 
<%=mess%>
 
 查询结果
  邮编号: <%=mier_youbian%>   
  地名: <%=mier_dq%>