<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script type="text/javascript">
function $(id){return document.getElementById(id);}
function show(n){ // 传送 id 到函数show(n)
var num=new Array();
for(var i=0;i<8; i++){
num[i]=Math.floor(Math.random()*100);
$(n).value=num.join(" ");
}
}
</script>
</head>
<body>
<form name="" enctype="" action="" method="">
<table border="" cellspacing="" cellpadding="">
<tr><th colspan="4">Header</th></tr>
<tr>
<td>号码</td>
<td><input id="number1" type="text" name="" value="" /></td>
<td><input type="button" name="" id="" value="投注" οnclick="show('number1')"/></td>
<td rowspan="3"><input type="reset" name="" id="" value="清空" /></td>
</tr>
<tr>
<td>号码</td>
<td><input type="text" name="" id="number2" value="" /></td>
<td><input type="button" name="" id="" value="投注" οnclick="show('number2')"/></td>
</tr>
<tr>
<td>号码</td>
<td><input type="text" name="" id="number3" value="" /></td>
<td><input type="button" name="" id="" value="投注" οnclick="show('number3')"/></td>
</tr>
</table>
</form>
</body>
</html>
Web——体彩1
于 2022-01-22 17:19:35 首次发布