<meta charset="utf-8">
<style type="text/css">
Body {background - image: url (../imges/03. PNG); Background - size: cover; Background - repeat: no - repeat; }
Dl # {margin - top: 200 px; Margin - left: auto; Margin - right: auto; Width: 600 px; height:200px; Color: # CCC; Background - color: # F00; The font-family: "Microsoft jas black"; The font - size: 20 px; The font - weight: bolder; text-align:center; Padding - top: 40 px; }
# bt {border: the outset; Border - color: # 6 f; text-align:center; Margin - left: auto; Margin - right: auto; Margin - top: 50 px; Height: 10 px; Width: 90 px; Color: # FFF. Border - the radius: 50 px; Background - color: # 6 f; The font-family: "Microsoft jas black"; The font - size: 20 px; The font - weight: bolder; The line - height: 28 px; Cursor: pointer; Padding - bottom: 30 px; Padding - top: 5 px; }
</style>
Var mytime=null;
The function doit () {
Var bt=window. The document. The getElementById (" bt "); If (mytime=null) {
Bt. InnerHTML="stop named";
show();
} else {
Bt. InnerHTML="began to roll call"; ClearTimeout (mytime);
Mytime=null;
}
}
The function show () {
Var dl=window. The document. The getElementById (" dl ");
Var num=Math. Floor (Math. The random () * namelist in length). Dl. InnerHTML=namelist [num];
Mytime=setTimeout (" show () ", 1);
}
</script>
<body>