除 IE 外,所有浏览器都可以使用。为什么不能在 IE 中工作?请帮忙!
这是小提琴
<script language = "javascript">
function ImageList(photo) {
var ImageList = document.getElementsByTagName("div");
for (var x = 0; x < ImageList.length; x++) {
name = ImageList[x].getAttribute("class");
if (name == 'ImageList-1') {
if (ImageList[x].id == photo) {
if (ImageList[x].style.display == 'block') {
ImageList[x].style.display = 'none';
} else {
ImageList[x].style.display = 'block';
}
} else {
ImageList[x].style.display = 'none';
}
}
}
}
function SpaceList(list) {
var SpaceList = document.getElementsByTagName("div");
for (var x = 0; x < SpaceList.length; x++) {
name = SpaceList[x].getAttribute("class");
if (name == 'SpaceList-1') {
if (SpaceList[x].id == list) {
if (SpaceList[x].style.display == 'block') {
SpaceList[x].style.display = 'none';
} else {
SpaceList[x].style.display = 'block';
}
} else {
SpaceList[x].style.display = 'none';
}
}
}
}
</script>