易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP产生不重复的随机数(模拟洗牌)

功能作用:ASP产生不重复的随机数(模拟游戏洗牌)
<%
function GetRnd(lowerNum,upperNum)
Dim unit,RndNum,Fun_X
unit = upperNum - lowerNum
Redim MyArray(unit)
For Fun_I=0 To unit
myArray(Fun_I)= lowerNum + Fun_I
Next
For Fun_I=0 To round(unit)
RndNum = getRndNumber(Fun_I,unit)
Fun_X = myArray(RndNum)
myArray(RndNum)=myArray(Fun_I)
myArray(Fun_I)=Fun_X
Next
GetRnd = myArray
end function
function getRndNumber(lowerbound,upperbound)
Randomize
getRndNumber=Int((upperbound-lowerbound+1)*Rnd+lowerbound)
end function
%>  


相关文档:

动态网页ASP语言基础(4)

VBSCRIPT 的数据类型
VBSCRIPT 只有一种数据类型:variant ,程序根据上下文来判断 variant 为数字类型还是字符串类型。
引号内的数字被看成字符串,如:a="12" ;
不带引号当然就是数字,如:b=13 。
实例:
以下为引用内容:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C// ......

asp中控制时间显示/存储样式

FormatDateTime
返回表达式,此表达式已被格式化为日期或时间。
FormatDateTime(Date[, NamedFormat])
参数
Date
必选项。要被格式化的日期表达式。
NamedFormat
可选项。指示所使用的日期/时间格式的数值,如果省略,则使用 vbGeneralDate。
设置
NamedFormat 参数可以有以下值:
常数 值 描述
vbGeneralDate ......

发一个自己封装的Asp Dll文件

调试程序和做程序的时候,好多重复的代码一直输入很麻烦,也很没有效率,封装一个自己的Asp包包,挺有有的
下载个精简版的VB6.0,新建 ActiveX dll,以下是封装的代码,重要部分都有注释,不懂可以跟帖
Option Explicit
Public Resp As Response, Requ As Request, Appl As Application, Serv As Server, Sess As Sessio ......

ASP 编程中 20 个非常有用的例子

1.如何用Asp判断你的网站的虚拟物理路径
答:使用Mappath方法
< p align="center" >< font size="4" face="Arial" >< b >
The Physical path to this virtual website is:
< /b >< /font >
< font color="#FF0000" size="6" face="Arial" >
< %= Server.MapPath("\")% >
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号