📄 823cook2.htm
字号:
<html>
<head>
<title>随机显示一些数字</title>
<style type="text/css">
<!--
body { font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 4px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 13px; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 13px; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋体"; cursor: hand; color: #FF0033 }
--></style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#fef4d9">
<br>
<br>
<center><font color=red face="隶书" size=6>随机显示一些数字</font></center>
<br>
<center>
<table border=5 bordercolor=blue borderlight=green>
<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>状态栏为脚本显示区</strong></font></td></tr>
<tr><td align=center>
<script language="javascript">
function Quickpick()
{
var ball
for( ball = 0; ball < 5; ball++)
{
this[ball] = parseInt((Math.random() * Math.pow(10,16)) % 49) + 1;
for(var list = 0; list < ball; list++)
{
if(this[list] == this[ball])
{
list = ball;
ball--;
}
}
}
this[ball] = parseInt((Math.random() * Math.pow(10,16)) % 42) + 1;
return this;
}
</script>
<script language="javascript">
var idx;
var powerball = new Array(6);
powerball = this.Quickpick();
document.write("<center>");
document.write("<font>产生</font><font color=#C00000>随机数字</font>,可以用作密码本用<br>");
document.write("<hr width=400><font size=+2>");
for(idx = 0; idx < 5; idx++)
document.write(powerball[idx] + " - ")
document.write("</font><font color=#D00000 size=+2>" + powerball[idx] + "</font>");
document.write("</center>");
</script>
</td></tr></table></center>
<br>
<br>
<center>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide
function goHist(a)
{
history.go(a);
}
//-->
</script>
<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">
</form>
</center>
<br>
<center>
<textarea name=source rows=12 cols=55 class=yk9>
脚本说明:
把如下代码加入<body>区域中:
<script language="javascript">
function Quickpick()
{
var ball
for( ball = 0; ball < 5; ball++)
{
this[ball] = parseInt((Math.random() * Math.pow(10,16)) % 49) + 1;
for(var list = 0; list < ball; list++)
{
if(this[list] == this[ball])
{
list = ball;
ball--;
}
}
}
this[ball] = parseInt((Math.random() * Math.pow(10,16)) % 42) + 1;
return this;
}
</script>
<script language="javascript">
var idx;
var powerball = new Array(6);
powerball = this.Quickpick();
document.write("<center>");
document.write("<font size=+2>POWER</font><font size=+2 color=#C00000>BALL</font><br>");
document.write("<hr width=400><font size=+2>");
for(idx = 0; idx < 5; idx++)
document.write(powerball[idx] + " - ")
document.write("</font><font color=#D00000 size=+2>" + powerball[idx] + "</font>");
document.write("</center>");
</script>
</textarea>
<br>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -