JS代码
<script type="text/javascript">
<!--
var j = 0;
function foto() {
var a = ["1.jpg", "2.jpg", "3.jpg", "4.jpg"];
j++;
if (j >= a.length) j = 0;
if (document.getElementById) {
document.getElementById('screenshot').src = a[j];
return false;
}
}
-->
</script>
<a href="2.jpg" title=""><img id="screenshot" src="1.jpg" alt="" onclick="return foto()"/></a>