var images = pics.getElementsByTagName("li");
var button = document.getElementById("button").getElementsByTagName("li");
function init(index){
for(i=index;i<button.length;i++){
mouseOverSwitchPic(i);
}
}
function mouseOverSwitchPic(i){
var picIndex=i;
button[i].onmouseover=function change(){
for(j=0;j<button[i].parentNode.childNodes.length;j++){
button[i].parentNode.childNodes[j].className="";
}
button[i].className="current";
for(m=0;m<images.length;m++){
images[m].className="";
if (m==picIndex){
images[m].className="show";
}
}
}
}
init(0);
以下是HTML文件:
我这看不到图片