close

<html>
<meta charset="UTF-8">

<head>
<title>期末1</title>
</head>

<body>
<script>

function add() {
var n=0;
var maxNum = 9;  
var minNum = 0;  
for(var i=1;i<=3;i++){  
    n = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;  
    document.write(n+" ");  
}  
}
</script>
<input type="button" value="產生亂數" onclick="add()"/>
<div id="piechart" style="width: 900px; height: 500px;"></div>

</body>
</html>
 

arrow
arrow
    全站熱搜

    darkspirits 發表在 痞客邦 留言(0) 人氣()