高分悬赏计算机达人,求图片切换代码
发布网友
发布时间:2022-10-26 13:44
我来回答
共3个回答
热心网友
时间:2023-09-15 07:37
下面是代码,换图修改
//slideimages数组为变换的图
var slideimages=new Array();
slideimages[0]="images/ad-01.jpg";
slideimages[1]="images/ad-02.jpg";
slideimages[2]="images/ad-03.jpg";
slideimages[3]="images/ad-04.jpg";
slideimages[4]="images/ad-05.jpg";
文字修改
//slidetext数组为变换的文字
var slidetext=new Array();
slidetext[0]="焦点图片广告011111";
slidetext[1]="焦点图片广告022222";
slidetext[2]="焦点图片广告033333";
slidetext[3]="焦点图片广告044444";
slidetext[4]="焦点图片广告055555";
链接修改
//slidetext数组为点击大图后跳到的地址
var slidelinks=new Array();
slidelinks[0]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[1]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[2]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[3]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[4]="http://www.webkkk.com/sygj/ggdm.htm";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0055)http://www.dazhuer.cn/other/jscode/imglh/ad17/index.htm -->
<HTML><HEAD><TITLE>无标题文档</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
TEXT-ALIGN: center
}
TD {
FONT-SIZE: 12px
}
#textslide {
COLOR: #333333
}
</STYLE>
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<TABLE cellSpacing=0 cellPadding=0 width=325 border=0>
<TBODY>
<TR vAlign=top>
<TD colSpan=3><A onmouseover=tu_ove() style="CURSOR: hand"
onclick=gotoshow() onmouseout=ou()><IMG height=190 src="images/ad-01.jpg"
width=325 border=0 name=slide></A></TD></TR>
<TR>
<TD class=white align=middle width=229 bgColor=#f4f4f4 height=19></TD>
<TD width=1 bgColor=#7c7c7c>
<DIV style="POSITION: relative">
<DIV style="POSITION: absolute; TOP: 10px">
<TABLE cellSpacing=0 cellPadding=0 width=95 border=0>
<TBODY>
<TR vAlign=top align=middle>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu1
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan1
height=3 src="images/bian1.gif" width=10 border=0></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu2
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan2
height=3 src="images/bian1.gif" width=10></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu3
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan3
height=3 src="images/bian1.gif" width=10></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu4
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan4
height=3 src="images/bian1.gif" width=10></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="LEFT: 1px; POSITION: relative">
<DIV id=xiaotu5
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan5
height=3 src="images/bian1.gif"
width=10></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV></TD>
<TD width=95 height=19>
<TABLE cellSpacing=0 cellPadding=0 width=95 border=0>
<TBODY>
<TR vAlign=top>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(0)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/1.gif" width=19 border=0></A></TD>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(1)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/2.gif" width=19 border=0></A></TD>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(2)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/3.gif" width=19 border=0></A></TD>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(3)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/4.gif" width=19 border=0></A></TD>
<TD width=19 height=19><A onmouseover=ove(4) style="CURSOR: hand"
onmouseout=ou()><IMG height=19 src="images/5.gif" width=19
border=0></A></TD></TR></TBODY></TABLE></TD></TR><tr><td colspan="3">
<DIV id=textslide>焦点图标题层</DIV></td></tr></TBODY></TABLE>
<SCRIPT>
//slideimages数组为变换的图
var slideimages=new Array();
slideimages[0]="images/ad-01.jpg";
slideimages[1]="images/ad-02.jpg";
slideimages[2]="images/ad-03.jpg";
slideimages[3]="images/ad-04.jpg";
slideimages[4]="images/ad-05.jpg";
//slidetext数组为变换的文字
var slidetext=new Array();
slidetext[0]="焦点图片广告011111";
slidetext[1]="焦点图片广告022222";
slidetext[2]="焦点图片广告033333";
slidetext[3]="焦点图片广告044444";
slidetext[4]="焦点图片广告055555";
//slidetext数组为点击大图后跳到的地址
var slidelinks=new Array();
slidelinks[0]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[1]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[2]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[3]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[4]="http://www.webkkk.com/sygj/ggdm.htm";
//焦点图初始内容--start
var slidespeed=3000
var slidesanjiaoimages=new Array("images/bian2.gif","images/bian1.gif");
var slidesanjiaoimagesname=new Array("xiaosan1","xiaosan2","xiaosan3","xiaosan4","xiaosan5");
var filterArray=new Array();
filterArray[0]="progid:DXImageTransform.Microsoft.Pixelate (enabled=false,ration=2,maxSquare=25 )";
filterArray[1]="progid:DXImageTransform.Microsoft.Stretch (ration=1,stretchStyle=PUSH)";
filterArray[2]="progid:DXImageTransform.Microsoft.Stretch(ration=1)";
filterArray[3]="progid:DXImageTransform.Microsoft.Slide(bands=8, ration=1)";
filterArray[4]="progid:DXImageTransform.Microsoft.Fade ( ration=1,overlap=0.25 )";
var imageholder=new Array()
var ie55=window.createPopup
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}
function tu_ove(){clearTimeout(setID)}
function ou(){slideit()}
var whichlink=0
var whichimage=0
function gotoshow(){
window.open(slidelinks[whichlink]);
}
function slideit(){
document.images.slide.style.filter=filterArray[whichimage];
//alert(document.images.slide.style.filter);
pixeldelay=(ie55)? (document.images.slide.filters[0].ration*1000) : 0
//alert(pixeldelay);
if (!document.images) return
if (ie55) {
document.images.slide.filters[0].apply();
document.images.slide.filters[0].play();
}
document.images.slide.src=imageholder[whichimage].src
document.getElementById("textslide").innerText=slidetext[whichimage];
document.getElementById("xiaosan1").src=slidesanjiaoimages[0];
document.getElementById("xiaosan2").src=slidesanjiaoimages[0];
document.getElementById("xiaosan3").src=slidesanjiaoimages[0];
document.getElementById("xiaosan4").src=slidesanjiaoimages[0];
document.getElementById("xiaosan5").src=slidesanjiaoimages[0];
document.getElementById(slidesanjiaoimagesname[whichimage]).src=slidesanjiaoimages[1];
if (ie55) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setID=setTimeout("slideit()",slidespeed+pixeldelay)
}
slideit()
function ove(n){
clearTimeout(setID)
whichimage=n;
document.images.slide.src=imageholder[whichimage].src
document.getElementById("textslide").innerText=slidetext[whichimage];
document.getElementById("xiaosan1").src=slidesanjiaoimages[0];
document.getElementById("xiaosan2").src=slidesanjiaoimages[0];
document.getElementById("xiaosan3").src=slidesanjiaoimages[0];
document.getElementById("xiaosan4").src=slidesanjiaoimages[0];
document.getElementById("xiaosan5").src=slidesanjiaoimages[0];
document.getElementById(slidesanjiaoimagesname[whichimage]).src=slidesanjiaoimages[1];
}
</SCRIPT>
</BODY></HTML>
热心网友
时间:2023-09-15 07:37
代码已PM过去 注意查收
热心网友
时间:2023-09-15 07:37
你用什么语言写??
热心网友
时间:2023-09-15 07:37
下面是代码,换图修改
//slideimages数组为变换的图
var slideimages=new Array();
slideimages[0]="images/ad-01.jpg";
slideimages[1]="images/ad-02.jpg";
slideimages[2]="images/ad-03.jpg";
slideimages[3]="images/ad-04.jpg";
slideimages[4]="images/ad-05.jpg";
文字修改
//slidetext数组为变换的文字
var slidetext=new Array();
slidetext[0]="焦点图片广告011111";
slidetext[1]="焦点图片广告022222";
slidetext[2]="焦点图片广告033333";
slidetext[3]="焦点图片广告044444";
slidetext[4]="焦点图片广告055555";
链接修改
//slidetext数组为点击大图后跳到的地址
var slidelinks=new Array();
slidelinks[0]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[1]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[2]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[3]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[4]="http://www.webkkk.com/sygj/ggdm.htm";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0055)http://www.dazhuer.cn/other/jscode/imglh/ad17/index.htm -->
<HTML><HEAD><TITLE>无标题文档</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
TEXT-ALIGN: center
}
TD {
FONT-SIZE: 12px
}
#textslide {
COLOR: #333333
}
</STYLE>
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<TABLE cellSpacing=0 cellPadding=0 width=325 border=0>
<TBODY>
<TR vAlign=top>
<TD colSpan=3><A onmouseover=tu_ove() style="CURSOR: hand"
onclick=gotoshow() onmouseout=ou()><IMG height=190 src="images/ad-01.jpg"
width=325 border=0 name=slide></A></TD></TR>
<TR>
<TD class=white align=middle width=229 bgColor=#f4f4f4 height=19></TD>
<TD width=1 bgColor=#7c7c7c>
<DIV style="POSITION: relative">
<DIV style="POSITION: absolute; TOP: 10px">
<TABLE cellSpacing=0 cellPadding=0 width=95 border=0>
<TBODY>
<TR vAlign=top align=middle>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu1
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan1
height=3 src="images/bian1.gif" width=10 border=0></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu2
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan2
height=3 src="images/bian1.gif" width=10></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu3
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan3
height=3 src="images/bian1.gif" width=10></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="POSITION: relative">
<DIV id=xiaotu4
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan4
height=3 src="images/bian1.gif" width=10></DIV></DIV></TD>
<TD width=19 height=0>
<DIV style="LEFT: 1px; POSITION: relative">
<DIV id=xiaotu5
style="LEFT: 0px; POSITION: absolute; TOP: -19px"><IMG id=xiaosan5
height=3 src="images/bian1.gif"
width=10></DIV></DIV></TD></TR></TBODY></TABLE></DIV></DIV></TD>
<TD width=95 height=19>
<TABLE cellSpacing=0 cellPadding=0 width=95 border=0>
<TBODY>
<TR vAlign=top>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(0)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/1.gif" width=19 border=0></A></TD>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(1)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/2.gif" width=19 border=0></A></TD>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(2)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/3.gif" width=19 border=0></A></TD>
<TD class=homejdboder width=19 height=19><A onmouseover=ove(3)
style="CURSOR: hand" onmouseout=ou()><IMG height=19
src="images/4.gif" width=19 border=0></A></TD>
<TD width=19 height=19><A onmouseover=ove(4) style="CURSOR: hand"
onmouseout=ou()><IMG height=19 src="images/5.gif" width=19
border=0></A></TD></TR></TBODY></TABLE></TD></TR><tr><td colspan="3">
<DIV id=textslide>焦点图标题层</DIV></td></tr></TBODY></TABLE>
<SCRIPT>
//slideimages数组为变换的图
var slideimages=new Array();
slideimages[0]="images/ad-01.jpg";
slideimages[1]="images/ad-02.jpg";
slideimages[2]="images/ad-03.jpg";
slideimages[3]="images/ad-04.jpg";
slideimages[4]="images/ad-05.jpg";
//slidetext数组为变换的文字
var slidetext=new Array();
slidetext[0]="焦点图片广告011111";
slidetext[1]="焦点图片广告022222";
slidetext[2]="焦点图片广告033333";
slidetext[3]="焦点图片广告044444";
slidetext[4]="焦点图片广告055555";
//slidetext数组为点击大图后跳到的地址
var slidelinks=new Array();
slidelinks[0]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[1]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[2]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[3]="http://www.webkkk.com/sygj/ggdm.htm";
slidelinks[4]="http://www.webkkk.com/sygj/ggdm.htm";
//焦点图初始内容--start
var slidespeed=3000
var slidesanjiaoimages=new Array("images/bian2.gif","images/bian1.gif");
var slidesanjiaoimagesname=new Array("xiaosan1","xiaosan2","xiaosan3","xiaosan4","xiaosan5");
var filterArray=new Array();
filterArray[0]="progid:DXImageTransform.Microsoft.Pixelate (enabled=false,ration=2,maxSquare=25 )";
filterArray[1]="progid:DXImageTransform.Microsoft.Stretch (ration=1,stretchStyle=PUSH)";
filterArray[2]="progid:DXImageTransform.Microsoft.Stretch(ration=1)";
filterArray[3]="progid:DXImageTransform.Microsoft.Slide(bands=8, ration=1)";
filterArray[4]="progid:DXImageTransform.Microsoft.Fade ( ration=1,overlap=0.25 )";
var imageholder=new Array()
var ie55=window.createPopup
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}
function tu_ove(){clearTimeout(setID)}
function ou(){slideit()}
var whichlink=0
var whichimage=0
function gotoshow(){
window.open(slidelinks[whichlink]);
}
function slideit(){
document.images.slide.style.filter=filterArray[whichimage];
//alert(document.images.slide.style.filter);
pixeldelay=(ie55)? (document.images.slide.filters[0].ration*1000) : 0
//alert(pixeldelay);
if (!document.images) return
if (ie55) {
document.images.slide.filters[0].apply();
document.images.slide.filters[0].play();
}
document.images.slide.src=imageholder[whichimage].src
document.getElementById("textslide").innerText=slidetext[whichimage];
document.getElementById("xiaosan1").src=slidesanjiaoimages[0];
document.getElementById("xiaosan2").src=slidesanjiaoimages[0];
document.getElementById("xiaosan3").src=slidesanjiaoimages[0];
document.getElementById("xiaosan4").src=slidesanjiaoimages[0];
document.getElementById("xiaosan5").src=slidesanjiaoimages[0];
document.getElementById(slidesanjiaoimagesname[whichimage]).src=slidesanjiaoimages[1];
if (ie55) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setID=setTimeout("slideit()",slidespeed+pixeldelay)
}
slideit()
function ove(n){
clearTimeout(setID)
whichimage=n;
document.images.slide.src=imageholder[whichimage].src
document.getElementById("textslide").innerText=slidetext[whichimage];
document.getElementById("xiaosan1").src=slidesanjiaoimages[0];
document.getElementById("xiaosan2").src=slidesanjiaoimages[0];
document.getElementById("xiaosan3").src=slidesanjiaoimages[0];
document.getElementById("xiaosan4").src=slidesanjiaoimages[0];
document.getElementById("xiaosan5").src=slidesanjiaoimages[0];
document.getElementById(slidesanjiaoimagesname[whichimage]).src=slidesanjiaoimages[1];
}
</SCRIPT>
</BODY></HTML>
热心网友
时间:2023-09-15 07:37
代码已PM过去 注意查收
热心网友
时间:2023-09-15 07:37
你用什么语言写??