The JS lottery simulation effect sounds incredible. If you don't have high requirements for the lottery, maybe this small lottery program will help you a lot, because it is really practical. I think webpage special effects are good. If you are interested, refer
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> JS simulated Lucky Draw effect </TITLE> <style type = "text/css">. a1 {position: relative; font-family: Verdana; font-size: 20px; color: #888888 ;}</style> <script language = "JavaScript"> function lotto () {if (! Document. all &&! Document. layers) return for (j = 1; j <48; j ++) // stop zero !? {Var a = Math. round (Math. random () * j + 1); var B = Math. round (Math. random () * j + 1); var c = Math. round (Math. random () * j + 1); var d = Math. round (Math. random () * j + 1); var e = Math. round (Math. random () * j + 1); var f = Math. round (Math. random () * j + 1);} var x = new Array (a, B, c, d, e, f ); if (x [0] = x [1]) | (x [0] = x [2]) | (x [0] = x [3]) | (x [0] = x [3]) | (x [0] = x [5]) | (x [1] = x [2]) | (x [1] = x [3]) | (x [1] = x [4]) | (X [1] = x [5]) | (x [2] = x [3]) | (x [2] = x [4]) | (x [2] = x [5]) | (x [3] = x [4]) | (x [3] = x [5]) | (x [4] = x [5]) | (x [5] = x [4]) lotto (); // restart else {var y = x. toString (); var z = y. split (','); for (I = 0; I <z. length; I ++) {z [I] = z [I] + ""; if (z [I]. length <3) // add '0' to singles z [I] = "0" + z [I] + "";} z = z. sort (); Nos = z [0] + z [1] + z [2] + z [3] + z [4] + z [5]; if (document. all) {document. all. la Yer1.innerHTML = Nos;} // or z! Else if (document. layers) {document.layers.layer1.doc ument. open (); document.layers.layer1.doc ument. write ("" + Nos + ""); document.layers.layer1.doc ument. close () ;}t = setTimeout ('lotto () ', 10 );}} // --> script </HEAD> <BODY> <table border = '0' width = 250 height = 50> <tr valign = 'middle'> <td align = 'center'> Result </td> </tr> </table> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]