<input id="rqn" readonly="" size="10" type="text"  />
<input onclick="rqn()" style="cursor: pointer;" type="button" value="1-70 的亂數" />


<script>Function rqn(){
document.getElementById("rqn").value=Math.floor(Math.random()*70+1);
}
rqn();
</script>


| 亂數 | Math.random() | button | readonly | onclick | input | function | script |

文章標籤
全站熱搜
創作者介紹
創作者 c8cc168 的頭像
c8cc168

421244103

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