求网页图片轮播代码,三张图,鼠标点击右下角图片号码就切换,不点击则自动切换
我用的校园网,大家所说的网页以及搜索,我是一个也打不开的,所以请不要让我自己搜索了,如果我能打开网页我早就自己找了。拜托直接把基本代码给我吧,我自己去修改。谢谢了...
我用的校园网,大家所说的网页以及搜索,我是一个也打不开的,所以请不要让我自己搜索了,如果我能打开网页我早就自己找了。拜托直接把基本代码给我吧,我自己去修改。谢谢了
展开
2个回答
展开全部
你试试
<script language="javascript">
j=0;
function show(){
for(ii=1;ii<6;ii++)
{
document.getElementById("pic"+ii).style.display="none";
document.getElementById("Submit"+ii).style.backgroundColor='';
}
j++
if(j==6){
j=1;
}
document.getElementById("pic"+j).style.display="block";
document.getElementById("Submit"+j).style.backgroundColor='blue';
a=setTimeout('show()',1000);
}
function pic(pic){
clearTimeout(a);
for(var i=1;i<=5;i++){
if(i==pic){
document.getElementById("pic"+pic).style.display="block";
document.getElementById("Submit"+pic).style.backgroundColor='blue';
j=i
}else {
document.getElementById("pic"+i).style.display="none";
document.getElementById("Submit"+i).style.backgroundColor='';
}
}
a=setTimeout('show()',1000);
}
</script>
<style type="text/css">
input{ background-color:white; border:#FF0000
border: 0px;
margin: 0px;
padding: 0px;
height: 20px;
width: 20px;
font-size: 14px;}
</style>
<body onLoad="show()">
<table width="461" height="163">
<tr>
<td width="426" rowspan="7">
<img id="pic3" style="display:none"src="image/class1-2.jpg" >
<img id="pic1" src="image/class1-3.jpg">
<img id="pic2" style="display:none" src="image/class1-1.jpg">
<img id="pic4" style="display:none" src="image/class1-4.jpg">
<img id="pic5" style="display:none" src="image/class1-5.jpg"></td>
<td height="15"> </td>
</tr>
<tr>
<td><input type="button" name="Submit1" value="1" onClick="pic('1')"></td>
</tr>
<tr>
<td><input type="button" name="Submit2" value="2" onClick="pic('2')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit3" value="3" onClick="pic('3')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit4" value="4" onClick="pic('4')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit5" value="5" onClick="pic('5')" /></td>
</tr>
<tr>
<td height="15"> </td>
</tr>
</table>
<script language="javascript">
j=0;
function show(){
for(ii=1;ii<6;ii++)
{
document.getElementById("pic"+ii).style.display="none";
document.getElementById("Submit"+ii).style.backgroundColor='';
}
j++
if(j==6){
j=1;
}
document.getElementById("pic"+j).style.display="block";
document.getElementById("Submit"+j).style.backgroundColor='blue';
a=setTimeout('show()',1000);
}
function pic(pic){
clearTimeout(a);
for(var i=1;i<=5;i++){
if(i==pic){
document.getElementById("pic"+pic).style.display="block";
document.getElementById("Submit"+pic).style.backgroundColor='blue';
j=i
}else {
document.getElementById("pic"+i).style.display="none";
document.getElementById("Submit"+i).style.backgroundColor='';
}
}
a=setTimeout('show()',1000);
}
</script>
<style type="text/css">
input{ background-color:white; border:#FF0000
border: 0px;
margin: 0px;
padding: 0px;
height: 20px;
width: 20px;
font-size: 14px;}
</style>
<body onLoad="show()">
<table width="461" height="163">
<tr>
<td width="426" rowspan="7">
<img id="pic3" style="display:none"src="image/class1-2.jpg" >
<img id="pic1" src="image/class1-3.jpg">
<img id="pic2" style="display:none" src="image/class1-1.jpg">
<img id="pic4" style="display:none" src="image/class1-4.jpg">
<img id="pic5" style="display:none" src="image/class1-5.jpg"></td>
<td height="15"> </td>
</tr>
<tr>
<td><input type="button" name="Submit1" value="1" onClick="pic('1')"></td>
</tr>
<tr>
<td><input type="button" name="Submit2" value="2" onClick="pic('2')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit3" value="3" onClick="pic('3')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit4" value="4" onClick="pic('4')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit5" value="5" onClick="pic('5')" /></td>
</tr>
<tr>
<td height="15"> </td>
</tr>
</table>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<script language="javascript">
j=0;
function show(){
for(ii=1;ii<6;ii++)
{
document.getElementById("pic"+ii).style.display="none";
document.getElementById("Submit"+ii).style.backgroundColor='';
}
j++
if(j==6){
j=1;
}
document.getElementById("pic"+j).style.display="block";
document.getElementById("Submit"+j).style.backgroundColor='blue';
a=setTimeout('show()',1000);
}
function pic(pic){
clearTimeout(a);
for(var i=1;i<=5;i++){
if(i==pic){
document.getElementById("pic"+pic).style.display="block";
document.getElementById("Submit"+pic).style.backgroundColor='blue';
j=i
}else {
document.getElementById("pic"+i).style.display="none";
document.getElementById("Submit"+i).style.backgroundColor='';
}
}
a=setTimeout('show()',1000);
}
</script>
<style type="text/css">
input{ background-color:white; border:#FF0000
border: 0px;
margin: 0px;
padding: 0px;
height: 20px;
width: 20px;
font-size: 14px;}
</style>
<body onLoad="show()">
<table width="461" height="163">
<tr>
<td width="426" rowspan="7">
<img id="pic3" style="display:none"src="image/class1-2.jpg" >
<img id="pic1" src="image/class1-3.jpg">
<img id="pic2" style="display:none" src="image/class1-1.jpg">
<img id="pic4" style="display:none" src="image/class1-4.jpg">
<img id="pic5" style="display:none" src="image/class1-5.jpg"></td>
<td height="15"> </td>
</tr>
<tr>
<td><input type="button" name="Submit1" value="1" onClick="pic('1')"></td>
</tr>
<tr>
<td><input type="button" name="Submit2" value="2" onClick="pic('2')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit3" value="3" onClick="pic('3')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit4" value="4" onClick="pic('4')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit5" value="5" onClick="pic('5')" /></td>
</tr>
<tr>
<td height="15"> </td>
</tr>
</table>
j=0;
function show(){
for(ii=1;ii<6;ii++)
{
document.getElementById("pic"+ii).style.display="none";
document.getElementById("Submit"+ii).style.backgroundColor='';
}
j++
if(j==6){
j=1;
}
document.getElementById("pic"+j).style.display="block";
document.getElementById("Submit"+j).style.backgroundColor='blue';
a=setTimeout('show()',1000);
}
function pic(pic){
clearTimeout(a);
for(var i=1;i<=5;i++){
if(i==pic){
document.getElementById("pic"+pic).style.display="block";
document.getElementById("Submit"+pic).style.backgroundColor='blue';
j=i
}else {
document.getElementById("pic"+i).style.display="none";
document.getElementById("Submit"+i).style.backgroundColor='';
}
}
a=setTimeout('show()',1000);
}
</script>
<style type="text/css">
input{ background-color:white; border:#FF0000
border: 0px;
margin: 0px;
padding: 0px;
height: 20px;
width: 20px;
font-size: 14px;}
</style>
<body onLoad="show()">
<table width="461" height="163">
<tr>
<td width="426" rowspan="7">
<img id="pic3" style="display:none"src="image/class1-2.jpg" >
<img id="pic1" src="image/class1-3.jpg">
<img id="pic2" style="display:none" src="image/class1-1.jpg">
<img id="pic4" style="display:none" src="image/class1-4.jpg">
<img id="pic5" style="display:none" src="image/class1-5.jpg"></td>
<td height="15"> </td>
</tr>
<tr>
<td><input type="button" name="Submit1" value="1" onClick="pic('1')"></td>
</tr>
<tr>
<td><input type="button" name="Submit2" value="2" onClick="pic('2')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit3" value="3" onClick="pic('3')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit4" value="4" onClick="pic('4')" /></td>
</tr>
<tr>
<td><input type="button" name="Submit5" value="5" onClick="pic('5')" /></td>
</tr>
<tr>
<td height="15"> </td>
</tr>
</table>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询