我不知道如何做到这一点,所以它会生成两个不同的数字并将其放入两个不同的文本框中我已经尝试了很多但我无法得到它
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Dice Game</title>
<style type="text/css">
body,input{font-family:sans-serif; color:#FF0000; background-color:#990000#000000; }
</style>
<script type="text/javascript"language="javascript">
function roller(){
var num=Math.ceil(Math.random()*6);
document.myForm.output.value=num;
}
</script>
</head>
<body>
<form id="myForm" name="myForm"method="post"action="">
<input type="button" name="Roll" id="Roll" value="Button" onclick="roller()"/>
<br/>
<input type="text" name="output" size="16" disabled="disabled" id="output"/>
<form id="myForm" name="myForm"method="post"action="">
<br/>
<input type="text" name="output" size="16" disabled="disabled" id="output"/>
</form>
</body>
</html>