发布网友 发布时间:2022-04-27 04:28
共3个回答
热心网友 时间:2022-06-26 05:15
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style ID="AsstStyle">
BODY{font: 宋体;}
TD{font: 宋体;}
.clickable {color:darkblue; cursor:hand}
</style>
<title></title>
</head>
<script type="text/javascript">
var n =0;
var array = new Array("https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-.gif","https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/ke/logo-ke.gif");
function changeimg(m){
n+=m;
if(n==array.length)
{
n = 0;
}
if(n<0)
{
n = array.length-1;
}
document.getElementById("img").src = array[n];
}
</script>
<body onload="changeimg(0)">
<span><a href="javascript:changeimg(1)">上一幅</a>
</span><span><a href="javascript:changeimg(-1)">下一幅</a</span>
<img width="100" height="100" id="img"/>
</body>
</html>
热心网友 时间:2022-06-26 05:15
去网上搜索个代码就好了
热心网友 时间:2022-06-26 05:16
把点击切换改成上一幅下一幅就行了