日期:2014-05-16  浏览次数:20294 次

还是抽奖问题-.-
<html>
<head>
<title> Untitled   Document </title>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<style   type= "text/css ">
<!--
.unnamed1   {
height:   150px;
width:   200px;
border:   0px   none;
font-size:   100px;
font-weight:   bolder;
color:   #FF0000;
text-align:   center;
}
-->
</style>
</head>
<script   language= "javascript ">
var   con= 'start ';
var   value;
var   valueArray   =   new   Array(10);

function   showme()   {

    if   (con== 'start ')   {
       
        do   {
            value   =   Math.round(Math.random()*10);
           
            if   (   value   <   10   )
                value   =   "00 "   +   value;
            else   {

                if   (   value   <   100   )
                    value   =   "0 "   +   value;
            }
        }

        while   (   valueArray[value]   )

        document.form.textfield.value   =   value;


        timeid=setTimeout( 'showme() ',50);
       
    }
    else   {
       
            valueArray[value]   =   value;

    }

}

function   startshowme(){
con= 'start ';
showme();
}


function   stopshowme(){
con= 'stop ';
}
</script>
<body>
<p> &nbsp; </p>
<p> <br>
</p>
<table   width= "100% "     border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
    <tr>
        <td   align= "center "> <form   name= "form "   method= "post "   action= " ">
            <input   name= "textfield "   type= "text "   class= "unnamed1 "     onFocus= "this.blur() "   size= "30 ">
        </form> </td>
    </tr>
    <tr>
        <td   align= "center "> <input   type= "button "   name= "Button "   value= "开始 "   onClick= "startshowme() ">   
        <input   type= "button "   name= "