答案:
<%@ Language=VBScript%> <%Response.ContentType="text/vnd.wap.wml"%> <?xml version="1.0" encoding="gb2312"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapfourm.org/DTD/wml_1.1.xml"> <wml> <head> <meta http-equiv="Cache-control" content="max-age=0" /> <meta http-equiv="Cache-control" content="no-cache" /> </head> <card title="手机归属地查询::掌握中国WAP门户"> <do type ="options" label='回首页'> <go href=>http://wap.zhangwo.cn"/> </do> <p> <% number=Trim(Request.Form("number")) if Len(number)<>11 then Response.Write " 手机号应该为11位! " else numbe = Left(number,7) db="zhangwocn.mdb" Set conn = Server.CreateObject("ADODB.Connection") connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"") conn.Open connstr set rs=server.CreateObject("adodb.recordset") rs.Open "select * from [mobile] where "&numbe&">=number1 and "&numbe&"<=number2 " ,conn,1,1 if rs.recordcount = 0 then Response.Write "对不起,没有你要查询的号码!" else sm=rs("sm") dm=rs("dm") qh=rs("qh") jg=rs("jg") rs.close set rs=nothing conn.close set conn=nothing %> 你查询的手机号:<%= number %><br/> 结果如下:<br/> 省份:<%= sm %><br/> 地区:<%= dm %><br/> 区号:<%= qh %><br/> 手机卡类:<%= jg %><br/> <% end if %> <% end if %> </p> <p> <a href=><a href=>http://wap.zhangwo.cn">返回掌握中国</a> </p> </card> </wml> |
上一个:解决WAP下ASP传递数据乱码问题
下一个:WAP中的ASP技术(二)