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