<HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--
function gen_ran() {
number2=Math.random();
number=Math.floor(100*number2);
document.frm.txt.value= number;
document.frm.txt2.value= number2;
}
//-->
</SCRIPT>
<BODY>
<CENTER>
<form name=frm>
<input type=text name="txt" size=5>
<input type=text name="txt2" size=16>
<input type=button onclick="gen_ran()" value="乱数発生">
</form>
</BODY>
</HTML>
|