Randomly selected, simple code. Copy code The code is as follows: random Lottery program < body> <br>var alldata = "a,b,c,d,e" <br>var alldataarr = alldata.split(","); <br>var num = alldataarr.length-1; <br>var timer <br>function change() <br>{ <br>document.getElementById("oknum").innerHTML = alldataarr[GetRnd(0,num)] ; <br>} <br>function start(){ <br>clearInterval(timer); <br>timer = setInterval('change()',10); <br>} <br>function ok(){ <br>clearInterval(timer); <br>document.getElementById("showresult").value=document.getElementById("oknum").innerText; <br>} <br>function GetRnd(min,max){ <br> return parseInt(Math.random()*(max-min 1)); <br>} <br> Please click to start Start Stop Your choice is: