码码小集

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>记录的显示</title>
</head>
<!--#include file="conn.asp"-->
<body>
<% 
''''''''''''查找一个字符串中一个字符出现的次数'''''''''''''''

'  function   getCount(express,defaultValue)  
'  count=0  
'  for   i=1   to   len(express)  
'  if   mid(express,i,1)=defaultValue   then  
'  count = count+1  
'  end   if  
'  next  
'  getCount=count  
'  end   function  
'  response.write   getCount("1,2,3,1,2,1,1,1","2")  

''''''''''''查找一个字符串中一个字符出现的次数'''''''''''''''
%>  
 
<%
''''''''''''''''将字符串排序'''''''''''''''''''''''''''''''

Ə,13,8,21,25
ཉ,8,21,25
'aaa="9,13,8,21,25"
's = split(aaa,",")
'for i=0 to ubound(s)
'min=i
'For j=i+1 To ubound(s)
'If CInt(s(i))>CInt(s(j)) Then
'min=j
'End if
'tem=s(i)
's(i)=s(min)
's(min)=tem
'Next
'pid=pid+s(i)+","
'Next
'response.Write(pid)

''''''''''''''''将字符串排序'''''''''''''''''''''''''''''''

%>

<%

''''''''''''''显示一条记录,并将其下一条记录也显示出来,同一行显示''''''''''''''
set rs=server.createobject("adodb.recordset")
rs.open "select *from chapter",conn,1,2
rs.movefirst
do while not rs.eof
t= rs("id")
response.write t &"&nbsp;&nbsp;"
rs.movenext
if not rs.eof then
t1= rs("id")
response.write t1
response.write "<br/>"
end if
loop
''''''''''''''显示一条记录,并将其下一条记录也显示出来,同一行显示''''''''''''''

''''''''''''rs.find''''''''''''''
'response.write "<br/>"
'set rs=server.createobject("adodb.recordset")
'rs.open "select *from chapter",conn,1,2
'rs.find "chaptername='value'"
'response.write rs("id")
''''''''''''rs.find''''''''''''''

%>
</body>
</html>

    A+
发布日期:2007年09月19日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: