Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en"
"Http://www.w3.org/TR/html4/loose.dtd" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> naming </title>
<script language= "javascript" type= "Text/javascript" >
var status = 1;
var name = new Array (' Fan Peng ', ' Zhang Zihan ', ' Dawn ', ' Sun Ti ', ' Nate ', ' Wang Hong gang ', ' Zengfanding ', ' Li Huan ', ' Zhu Ying ', ' Wang Sha ', ' Zheng Lin ', ' Zhu Zhenjia ', ' King One ', ' undeterred ', ' Gou super ', ' Wutongguang ', ' Liang Liang ' , ' Liu June ');
function GetName () {
Return Name[math.floor (Math.random () *name.length)];
}
function ShowName () {
document.getElementById ("name"). InnerHTML = GetName ();
settimeout ("ShowName", 200);
}
function Goname () {
Intimer = SetInterval (ShowName, 200);
}
function Stopname () {
if (status = = 1) {
Clearinterval (Intimer);
Status = 0;
}else{
Intimer = SetInterval (ShowName, 200);
status = 1;
}
}
</script>
<style>
#name {
border:1px solid #000;
Margin:auto;
font-size:36px;
Color: #000000;
width:108px;
Height:1em;
Cursor:pointer;
Text-align:center;
}
</style>
<body onload= "Goname ()" >
<div id= "name" onclick= "Stopname ()" ></div>
</body>