<input type="text" id="oText"><input type="button" value="begin" onclick="doBegin()">
<input type="button" value="finish" onclick="doFinish()"><script language="javascript">
<!--
var arr = new Array();
arr[0] = "text0";
arr[1] = "text1";
arr[2] = "text2";
arr[3] = "text3";
arr[4] = "text4";
var intI = 0;
var oInterval;
function show()
{
oText.value = arr[intI]
if(intI ==4)
{
intI = 0;
}
else
{
intI++;
}
}function doBegin()
{
oInterval = setInterval(show,1000);
}function doFinish()
{
clearInterval(oInterval);
alert("u selectValue is : "+oText.value);
}
//-->
</script>

解决方案 »

  1.   

    <HTML>
    <HEAD>
    <TITLE>-51windows.Net</TITLE>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <META NAME="Author" CONTENT="51windows,海娃,haiwa">
    <META NAME="Description" CONTENT="Power by 51windows.Net">
    </HEAD><BODY>
    <input type="text" name="show" value="">
    <button onclick='timer = setInterval("giveone()",50);'>开始</button><button onclick='clearInterval(timer);'>停</button>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var timer
    function giveone()
    {
    allstr = "1,2,3,4,5,6,7,8,9,10,dsfwef,dsfds,3333,dsf,dsfds,f,sdds"
    strtmp = allstr.split(",")
    var rndNum = Math.round(Math.random() * strtmp.length)
    document.all.show.value = strtmp[rndNum-1]
    }
    //-->
    </SCRIPT>
    </BODY>
    </HTML>
      

  2.   

    這不就是產生幸運號碼:
    <script language='javascript'>
    <!--
    var valuearray=new Array()
    var goflag=1;
    for(var i=1;v<N;++i)
         valuearray[i]=i
    function f_load(flagvalue)
    { goflag=flagvalue
      for(i=0;i<N;++i)
      { if(myform.test.value==valuearray[i])
         {if(i==N-1)
           {myfom.test.vlaue=valuearray[1];break}
          else
         {myfom.test.vlaue=valuearray[i+1];break}
          }
       }
     if(goflag)
      settimeout(500,'f_load('+goflag+')')
       }
    //--><body onload=f_load()>
    <form name=myform>
    <input name=testinput value=''>
    <input type=button name=begin value='begin' onclick='begin(1)'>
    <input type=button name=end value='end' onclik='end(0)'>
    </form>
      

  3.   

    yeefly(Web开发版):基本合格。20分。
    zqp1771(風之曲):正是此中奖程序。30分。
      

  4.   

    to 51windows(海娃):谢谢。
    其实你的是最好的。我给完分才发现。
    这个问题我在这个贴子里也提到了,没结贴,你回一下吧,我再给你70分!
     http://expert.csdn.net/Expert/topic/2871/2871540.xml?temp=.2292292