<html>
<script type="javascript">
var building=new Array(10)
building[1]="images_buildings/abudhabi.jpg"
building[2]="images_buildings/auckland.jpg"
building[3]="images_buildings/coffsharbour.jpg"
building[4]="images_buildings/endinburge.jpg"
building[5]="images_building/la.jpg"
building[6]="images_building/london.jpg"
building[7]="images_building/newyork.jpg"
building[8]="images_buildings/singapore.jpg"
building[9]="images_buildings/sydney.jpg"
building[10]="images_buildings/toronto.jpg"
var num = 0
function changepic()
{
num=num+1
if (num==11)
{num=1}
document.buildingpic.src=eval("building"+num+".src" )
}
</script>
</head>
<body>
<center>
<img src="images_buildings/abudhabi.jpg" name="buildingpic" width="400"
height="400" />
<p><A HREF="JavaScript:changepic()">next</A></p>
</center>
</p>
</body>
</html>
我试图研究,但找不到任何对我有帮助的东西——一旦我解决了这个问题,我将添加另一个 pic 数组和一个信息数组:/但我一次只构建一个 :)