📄 random.asp
字号:
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<HTML>
<HEAD>
<TITLE>用Tools组件生成随机整数</TITLE>
</HEAD>
<BODY BGCOLOR="White" topmargin="10" leftmargin="10">
<!-- Display Header -->
<font size="4" face="Arial, Helvetica">
<b>用Tools组件生成随机整数</b></font><br>
<hr size="1" color="#000000">
<% Dim Tools
Dim FoundFile, FileExists, FileDoesNotExist, NotFoundFile
Dim RandInt, RandPosInt, RandIntBelow
Set Tools = Server.CreateObject("MSWC.Tools") %>
<h3>随机整数实例</h3>
<% ' Random Integer
RandInt = Tools.Random
Response.Write "随机整数: "
Response.Write RandInt
Response.Write "<BR>"
RandPosInt = Abs( Tools.Random )
Response.Write "随机整数的绝对值: "
Response.Write RandPosInt
Response.Write "<BR>"
RandIntBelow = Abs( Tools.Random ) Mod 200
Response.write "小于200的随机整数: "
Response.write RandIntBelow
Response.write "<BR>" %>
</BODY> </HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -