下面就是完整的一个显示页面的例子:

<%@ LANGUAGE="VBScript" %>
<%
dim j
j=0
%>
<%
Function c2u(text)
  For i=1 to Len(text)
  c=Mid(text,i,1)
  c2u=c2u&"&#x" & Hex(AscW(c)) & ";"
  next
 End Function
%>
<%
 set conn=server.createobject("adodb.connection")
 conn.open"dsn=money;uid=;pwd=;database=money.mdb"
 sql0="update stock set temp=(price5-price4)/price4*100"
 set rs0=server.createobject("adodb.recordset") 
 rs0.open sql0,conn
 sql="select num,name,temp from stock where temp<0 order by temp ASC"
 set rs=server.createobject("adodb.recordset") 
 rs.open sql,conn 
%>
<% Response.ContentType="text/vnd.wap.wml" %><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml>

<card id="ShowCurrent">
<p>
  <%=c2u("跌幅前五名:")%><br/>
<%
while j<5 and not rs.eof
%>
  <%=rs(0).Value%>-<%=c2u(rs(1).Value)%>&nbsp;<%=rs(2).Value%>%
<br/>
<%
rs.movenext
j=j+1
wend
%>
</p>
<do type="accept" label="<%=c2u("返回")%>">
 <go href="index.asp#Welcome"/>
</do>
<p align="center">
(c) 501 Studio, 2001<br/>
All rights reserved !
</p>
</card>
</wml> 
<%
rs.close
%>

  下面就是完整的一个显示页面的例子:

<%@ LANGUAGE="VBScript" %>
<%
dim j
j=0
%>
<%
Function c2u(text)
  For i=1 to Len(text)
  c=Mid(text,i,1)
  c2u=c2u&"&#x" & Hex(AscW(c)) & ";"
  next
 End Function
%>
<%
 set conn=server.createobject("adodb.connection")
 conn.open"dsn=money;uid=;pwd=;database=money.mdb"
 sql0="update stock set temp=(price5-price4)/price4*100"
 set rs0=server.createobject("adodb.recordset") 
 rs0.open sql0,conn
 sql="select num,name,temp from stock where temp<0 order by temp ASC"
 set rs=server.createobject("adodb.recordset") 
 rs.open sql,conn 
%>
<% Response.ContentType="text/vnd.wap.wml" %><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml>

<card id="ShowCurrent">
<p>
  <%=c2u("跌幅前五名:")%><br/>
<%
while j<5 and not rs.eof
%>
  <%=rs(0).Value%>-<%=c2u(rs(1).Value)%>&nbsp;<%=rs(2).Value%>%
<br/>
<%
rs.movenext
j=j+1
wend
%>
</p>
<do type="accept" label="<%=c2u("返回")%>">
 <go href="index.asp#Welcome"/>
</do>
<p align="center">
(c) 501 Studio, 2001<br/>
All rights reserved !
</p>
</card>
</wml> 
<%
rs.close
%>


1条评论

  1. 我看很好啊!

发表评论

评论也有版权!