<body>
<form action=randomeasy.asp method=post>
Max : <input type=text name=nummax size=5 value=999> <br>
Min : <input type=text name=nummin size=5 value=1> <br>
Amt : <input type=text name=numamt size=5 value=15> <br>
<input type=submit value=Random><input type=reset value=Reset>
</form>
<%
numamt = request.form("numamt")
nummax = request.form("nummax")
nummin = request.form("nummin")
if (nummax <= nummin) or (numamt <= 0) then
response.write( "Invalid command")
else
randomize
for i = 1 to numamt
x = int(nummin + (rnd * ( nummax - nummin + 1 )))
response.write( i & " : " & x & "<br>")
next
end if
%>
</body>
จำนวน : 23 บรรทัด