Several colleagues in a variety of requests, for them to write the sports Lottery random number generator program, using cookies.

Source: Internet
Author: User
Tags generator
<html>


<head>


<meta http-equiv= "Content-type" content= "text/html"; charset=gb2312 ">


<title> Sports lottery draw </title>


<script language= "JavaScript" ><!--


/*-----------------------------------------------------


several colleagues in a variety of requirements, for them to write this program, and I never buy lottery tickets, do not understand.


But if you're really in the jackpot, don't forget to tell me, Chiang Yo, what? Afraid I'll share your money?


I do not greedy, the most send me a classic music disc I am very happy!


by Jianglixin@163.net (hastily written, code messy collation) 2001.2.28


-------------------------------------------------------*/


function Setcookie ()


{


var Then = new Date ();


if (document.all.lucknum.innertext.length>20)


    {


Then.settime (Then.gettime () + 1000*60*1000);


Document.cookie = "lastnum=" +document.all.lucknum.innertext+ "; expires=" + then.togmtstring ();


    }


}


function GetCookie ()


{    


var cookieheader = "lastnum=";


var beginposition = document.cookie.indexOf (Cookieheader);


var status=document.cookie.substring (beginposition + cookieheader.length);


document.all.lastnum.innertext= "Last selected number for you:" +status;


}





function Check (form)


    {


     


if (form.inputname.value.length<1)


{alert ("Please enter your name!") ");


Form.inputName.focus ();


return (false);


        


if (form.inputnum.value.length<1)


{alert ("Please enter your birthday or lucky number!") ");


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.