选择显示字体大小

wap版的手机号码所在地查询

如果你的手机不支持wap或者不愿意那几分钱的话,可以用gelon.net提供的一个模拟器来看看我的作品
直接打开这个地址就可以了
http://www.gelon.net/cgi-bin/wapalize.cgi?url=http://hikey.net/wap

//ie的编码要选择简体中文哈
//按滚轮下滑屏幕

wap上网按流量计费,我没用图片,字数也不多
查询点东西应该还算合算哈

主要代码:

<% response.contenttype="text/vnd.wap.wml" %>
<?xml version="1.0" encoding="gb2312"?>
<!doctype wml public "-//wapforum//dtd wml 1.3//en" "http://www.wapforum.org/dtd/wml13.dtd" >
<wml>
<card id="sj" title="手机号码所在地查询">
<%
' 数据库连接
dim connstr1,conn1
const db="xxx.mdb" '手机库路径
connstr1="dbq="+server.mappath(""&db&"")+";defaultdir=;driver=&#123;microsoft access driver (*.mdb)&#125;;"
set conn1=server.createobject("adodb.connection")
conn1.open connstr1

'过滤非法字符
function chk(str)
if str<>"" then
chktopic=replace(str,"'","''")
end if
end function
%>
<%
'手机查询
if request.form("sj")<>"" then
d= chk(request.form("sj"))
'判断是否为数字或者大于7位的数字
if len(d)>=7 and isnumeric(d) then
c=left(d,7)

'这里省略了很多代码
sql="select * from mod where start<="&c&" and end>="&c&" and mid(start,3,1)="&mid(c,3,1)&" and mid(end,3,1)="&mid(c,3,1)&" and mid(start,4,1)="&mid(c,4,1)&" and mid(end,4,1)="&mid(c,4,1)&" and mid(start,5,1)="&mid(c,5,1)&" and mid(end,5,1)="&mid(c,5,1)&" and mid(start,6,1)="&mid(c,6,1)&" and mid(end,6,1)="&mid(c,6,1)&" "
set rs=conn1.execute(sql)
if not rs.eof then
a=rs("city")
b=rs("city1")
e=rs("url")
f=rs("thank")
set rs=nothing
else
a="对不起,没有找到这个号码的纪录"
end if
else
a="错误:请确保你输入的是大于7位的数字!"
end if
%>
<b>您搜索的手机号码:</b><br/>
<%=d%><br/>
<b>所在地址:</b><%=a%> <%=b%><br/>
<b>区号和描述:</b><br/>
<%=e%> <%=f%>
<br/><br/>
<%end if%>

请输入手机号码
<input size="8" name="sj" type="text" maxlength="11" />
<anchor title="确定">确定
<go href="index.asp" method="post">
<postfield name="sj" value="&#36;sj"/>
</go>
</anchor>
<p align="center"><b>hikey.net</b></p>
</card>
</wml>
<%
set conn1=nothing
%>


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons