JS Lottery Program

Source: Internet
Author: User
Tip: You can modify some of the code before running

<style type= "Text/css" > a1{position:relative; font-family:verdana; color: #888888;} font-size:20px > <script language= "JavaScript" >/* Lottery Picker (by Kurt in Kurt.grigg@virgin.net) featured on DYNAMICDRIVE.C Om for full source, usage terms, and m more DHTML scripts, visit http://dynamicdrive.com/function Lotto () {if (!do Cument.all&&!document.layers) return for (J=1 J < + 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.layer1.innerhtml=nos;} OR Z! else if (document.layers) {document.layers.layer1.document.open (); Document.layers.layer1.document.write ("<span > " +nos+ "</span>"); Document.layers.layer1.document.close (); } t=settimeout (' Lotto () ', 10); }//--> </script> <table border= ' 0 ' width=250 height=50> <tr valign= ' middle ' > <td align= ' Center ' > <form name=form> <input type=button value= ' lottery number Picker ' onclick= ' Lotto (), settimeout (' Cleartimeout (T) ', 3000) ' > </form> <span id=layer1 class=a1>result</span> </td> </tr> </table>
Tip: You can modify some of the code before running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.