这是js:
var img = new Array();
img[0] = "img/big1.jpg";
img[1] = "img/big2.jpg";
img[2] = "img/big3.jpg";
img[3] = "img/big4.jpg";
function $(obj){
return document.getElementById(obj);
}
function $img(url){
return "";
}
function changeborder(obj){
for(var j = 0;j < img.length;j++){
$("imgList").getElementsByTagName("li")[j].getElementsByTagName("img")[0].style.borderColor = "#cccccc";
}
obj.style.borderColor= "red";
$("bImg").innerHTML = $img(obj.src);
}
window.onload = function(){
for(var i = 0;i < img.length;i++){
$("imgList").innerHTML += "
可以利用“层”,为层添加行为--显示和隐藏。