Js随机数产生6位数字_javascript技巧
来源:动视网
责编:小采
时间:2020-11-27 20:49:13
Js随机数产生6位数字_javascript技巧
Js随机数产生6位数字_javascript技巧: 代码如下: function MathRand() { var Num=; for(var i=0;i{ Num+=Math.floor(Math.random()*10); } document.getElementById(Lb_Random).innerText=Num; document.getElementById(Lb_Rando
导读Js随机数产生6位数字_javascript技巧: 代码如下: function MathRand() { var Num=; for(var i=0;i{ Num+=Math.floor(Math.random()*10); } document.getElementById(Lb_Random).innerText=Num; document.getElementById(Lb_Rando

代码如下:
function MathRand()
{
var Num="";
for(var i=0;i<6;i++)
{
Num+=Math.floor(Math.random()*10);
}
document.getElementById("Lb_Random").innerText=Num;
document.getElementById("Lb_Random").innerHTML=Num;
}
script>
Js随机数产生6位数字_javascript技巧
Js随机数产生6位数字_javascript技巧: 代码如下: function MathRand() { var Num=; for(var i=0;i{ Num+=Math.floor(Math.random()*10); } document.getElementById(Lb_Random).innerText=Num; document.getElementById(Lb_Rando