var C=[“写代码1”,“写代码2”,“写代码3”,“写代码4”,“写代码5”,“写代码6”,“写代码7”,“写代码8”,“写代码9”,“写代码10”,“写代码11”,“写代码12”,]
var D=["","","","","","","","","","","","",]
var A=document.getElementsByClassName("a1")
var B=document.getElementById("w1")
for(i=0; i< A.length;i++){
A[i].index=i;
A[i].onmouseover=function ()
{ this.style.backgroundColor="#FFFFFF"
this.style.color="red"
B.innerText=this.innerText+ C[this.index] ;
}
A[i].onmouseout=function ()
{ this.style.backgroundColor=" #424242"
this.style.color="#FFFFFF"
B.innerText=D[this.index]}
}