教程集 www.jiaochengji.com
教程集 >  脚本编程  >  Asp.net  >  正文 ASP Randomize生成随机IP实例代码

ASP Randomize生成随机IP实例代码

发布时间:2016-09-23   编辑:jiaochengji.com
教程集为您提供ASP Randomize生成随机IP实例代码等资源,欢迎您收藏本站,我们将为您提供最新的ASP Randomize生成随机IP实例代码资源
IP地址的替换是255.255.255.255但我们实际IP不能超过255哦,我们只要使用asp的随机中子*这个娄就可以了.

实例

<table width="620" align="center" border="0" cellpadding="1" cellspacing="1" style="background:#FB7"> <tr> <td width="464" height="27" bgcolor="#FFE7CE"> 代码如下</td> <td width="109" align="center" bgcolor="#FFE7CE" style="cursor:pointer;" onclick="doCopy('copy2069')">复制代码</td> </tr> <tr> <td height="auto" colspan="2" valign="top" bgcolor="#FFFFFF" style="padding:10px;" class="copyclass" id=copy2069>

<%
randomize
ip=int(225*rnd) 25&"."&int(225*rnd) 25&"."&int(225*rnd) 25&"."&int(225*rnd) 25
response.write(ip)
%>

关于Randomize

初始化随机数生成器。

Randomize [number]

number 参数可以是任何有效的数值表达式。

说明
Randomize 使用 number 参数初始化 Rnd 函数的随机数生成器,赋给它新的种子值。如果省略 number,则使用系统计时器返回的值作为新的种子值。

如果不使用 Randomize,则第一次调用 Rnd 函数(无参数)时,它将使用相同的数字作为种子值,随后使用最后生成的数值作为种子值。

注意 要重复随机数的序列,请在使用数值参数调用 Randomize 之前,立即用负值参数调用 Rnd。使用相同的 number 值的 Randomize 不能重复先前的随机数序列。

您可能感兴趣的文章:
ASP Randomize生成随机IP实例代码
asp随机数实例-生成N位由数字和字母组成的密码
ASP生成不重复随机数的实例代码
asp中Rnd随机数函数用法浅析
asp生成随机数(数字与大小写字母指定位数的随机数)
ASP生成不重复的随机数字
ASP中VBScript生成随机数的类
ASP随机数RND()函数用法
用vbs生成若干个随机数并写入txt文件中的代码
php生成随机产生六位数密码的代码

[关闭]
~ ~