脚 本 之 家 www.jb51.net
页面导航:  不限条件-->数?
本地搜索:
//MSDN Randomize为了生成某个范围内的随机整数,可使用以下公式:Int((upperbound - lowerbound + 1) * Rnd + lowerbound) 这里,upperbound 是随机数范围的上限,而 lowerbound 则是随机数范围的下限。 ---- 在VB中的随机函数是Rnd,但在使用的过程中发现,虽然程序启动后产生的数值是随机的,但对于每次重新启动,程序都会产生相同的随机数序列,应该怎样解决?&nbs...
http://www.jb51.net//article/7984.htm
page.inc<%SubShowPageBar(TotalPage,CurPage,strUrl)'参数TotalPage:全部页数;CurPage:当前页数;strUrl:翻页使用的连接地址.DIMstrPageCurPage=GetValidPageNO(TotalPage,CurPage)Response.Write"<TABLEWIDTH=''100%''>"Response.Write"<tr><tdwidth=''100%''align=''right''>"Response.Write"页数:"&CurPage&"/"&...
http://www.jb51.net//article/4787.htm
'设置好global.asa文件,如下:<scriptLANGUAGE="VBScript"RUNAT="Server">SubApplication_OnStart   Application("ActiveUsers")=0   '设置计数初始值,可以根据自己的需要哦.EndSubSubSession_OnStart   Session.Timeout=20'根据需要,设置超时时间.   Session("Start")=Now'设置一个Session开始时间...
http://www.jb51.net//article/4763.htm
如何让计数器只对新进用户计数?<scriptlanguage=vbscriptrunat=server>subapplication_onstartfilepath=server.mappath("/count")filename=filepath+"\counter.txt"setfs=createobject("scripting.filesystemobject")ifnotfs.fileexists(filename)then fs.createtextfile(filename)   setf=fs.getfile(filename...
http://www.jb51.net//article/4761.htm
如何防止计数器刷新计数?<html><head><title>千花飞舞之真实的计数器</title></head><body><%dimtms,counter,countlendimimages(20)h1="<p>千花飞舞计数器</font></p>"IfIsEmpty(Session("hasbeenConnected"))thensetrs=server.createobject("adodb.recordset")application.lockrs.open"update...
http://www.jb51.net//article/4760.htm
quote.asp<%SetMyFileObj=Server.CreateObject("Scripting.FileSystemObject")SetMyTextFile=MyFileObj.OpenTextFile("c:\quote.txt")'设置好路径.IFNOTMyTextFile.AtEndOfStreamTHENheader=CInt(MyTextFile.ReadLine)'读表头.ENDIFRANDOMIZE'生成基于表头的随机数,RANDOMIZE语句对确保一个随机数非常重要.RandomValue=INT(header*RND)+1Count=0'循环直到行号等于...
http://www.jb51.net//article/4745.htm
<%response.writemakePassword(16)functionmakePassword(byValmaxLen)DimstrNewPassDimwhatsNext,upper,lower,intCounterRandomizeForintCounter=1TomaxLen  whatsNext=Int((1-0+1)*Rnd+0)IfwhatsNext=0Then    upper=90    lower=65Else    upp...
http://www.jb51.net//article/4744.htm
PublicFunctionXtoF(strAsCurrency,OptionalfenmAsInteger=32)AsString'只限于整除分数. DimCfmAsCurrency DimcfmmodAsInteger OnErrorGoToErroreof  Cfm=1/fenm XtoF="" Ifstr=0ThenXtoF="":ExitFunction  DimpointAsInteger DimdIntAsString DimdPointAsCurrency D...
http://www.jb51.net//article/4693.htm
如何准确地获得一个整数?functionNumbersOnlyNoDecimals(pInString) lNumbersOnly=""   forx=1tolen(pInString) y=(len(pInString)-x+1)     ifisNumeric(mid(pInString,y,1))then   lNumbersOnly=lNumbersOnly+mid(pInString,y,1) else   ifmi...
http://www.jb51.net//article/4692.htm
如何检测字符串出现的次数?FunctionCheckTheChar(TheChar,TheString)'TheChar="要检测的字符串".'TheString="待检测的字符串".ifinStr(TheString,TheChar)thenforn=1toLen(TheString)ifMid(TheString,n,Len(TheChar))=TheCharthenCheckTheChar=CheckTheChar+1EndifNextCheckTheChar="这个字符"&CheckTheChar&"次"elseCheckTheChar="0次"endifEndFunc...
http://www.jb51.net//article/4691.htm
如何编写一个创建FTP站点的函数?Function ASTCreateFtpSite(IPAddress, RootDirectory, ServerComment, HostName, PortNum, Computer, Start,LogFileDirectory)    Dim MSFTPSVC, FtpServer, NewFtpServer, NewDir    Dim Binding...
http://www.jb51.net//article/4675.htm
共有:12/10,当前1/2页  [首页] [上一页] 1 2 [下一页]  [尾页] 转到: