发布网友 发布时间:2022-04-22 06:00
共1个回答
热心网友 时间:2023-07-02 16:42
<script>
var picarr=new Array("1.jpg","2.jpg","3.jpg");
var mypoint=-1;
function changepic(myflag)
{
if(myflag<0)
{
mypoint=mypoint-1;
if (mypoint<0) { mypoint=picarr.length-1;}
}
else
{
mypoint=mypoint+1;
if (mypoint==picarr.length) { mypoint=0;}
}
document.getElementById("pic").src=picarr[mypoint];
}
</script>
<body style="text-align:center;" onload="changepic(0);">
<div style="width:810px;background-color:#eee">
<span onclick="changepic(-1);" onmousemove="this.style.color='red';" onmouseout="this.style.color='blue';" style="cursor: hand">《-LastOne </span>
<img id=pic border="0" width=600 style="text-align:center;vertical-align:middle;"/>
<span onclick="changepic(0);" style="cursor: hand;" onmousemove="this.style.color='red';" onmouseout="this.style.color='blue';" > NextOne-》</span>
</div>
<body>