?? 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 + -