1<! DOCTYPE html>234<meta charset= "UTF-8" >5<title> Name Register </title>6<style type= "Text/css" >7*{8margin:0;9padding:0;Ten } One #outer { A margin:50px; - padding:50px; - width:600px; the /*height:600px;*/ -border-radius:20px; -background-Color:orange; - } + #box { -margin-top:20px; + padding:20px; Abackground-Color:grey; atfont-size:40px; -font-Weight:bold; - } - #bt { - width:80px; -margin-top:5px; in padding:10px; -background-Color:green; tofont-size:20px; +font-Weight:bold; - Cursor:pointer; the } * $</style>Panax Notoginseng -<body> the<center> +<<div id= "outer" > A<div id= "box" ></div> the<button type= "button" id= "BT" >start</button> +</div> -</center> $ $<script type= "Text/javascript" > - varnamelist=["Lionel Messi", "Neymar", "Luis Suarez", "Illesta", "Busquets", "Pico", "Roberto", "Lakitic", "Javier Mascherano"] - varFlag=0; the varBt=document.getelementbyid ("BT"); - varBox=document.getelementbyid ("box")Wuyibt.onclick=function(){ the if(flag==0){ -Flag=1; WuBt.innerhtml= "Stop"; -Bt.style.backgroundcolor= "Red"; About Show (); $ } - Else{ -Bt.innerhtml= "Start"; -Bt.style.backgroundcolor= "Green"; A cleartimeout (flag); +Flag=0; the } - $ } the functionShow () { the varNum=math.floor (Math.random () *1000)%namelist.length; theBox.innerhtml=Namelist[num]; theFlag=settimeout ("Show ()", 100); - } in</script> the</body> theJS writing the name register