| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 737 人关注过本帖
标题:[求助]请问那位朋友那里有交换图片的代码?
只看楼主 加入收藏
快乐如我
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-11-22
收藏
 问题点数:0 回复次数:2 
[求助]请问那位朋友那里有交换图片的代码?

[求助]请问那位朋友那里有交换图片的代码?
我下载了一个不知道怎么改?
<SCRIPT>
<!--
transeffect = 0;
theeffects = new Array(24);
theeffects[0] = "盒状收缩";
theeffects[1] = "盒状向外";
theeffects[2] = "圆形收缩";
theeffects[3] = "圆形向内";
theeffects[4] = "从下向上";
theeffects[5] = "从上向下";
theeffects[6] = "从左向右";
theeffects[7] = "从右向左";
theeffects[8] = "百页窗形向右";
theeffects[9] = "百页窗形向下";
theeffects[10] = "棋盘形交叉向右";
theeffects[11] = "棋盘形交叉向下";
theeffects[12] = "随意溶解形";
theeffects[13] = "左右向内";
theeffects[14] = "左右向外";
theeffects[15] = "上下向内";
theeffects[16] = "上下向外";
theeffects[17] = "条纹状向左下";
theeffects[18] = "条纹状向左上";
theeffects[19] = "条纹状向右下";
theeffects[20] = "条纹状向右上";
theeffects[21] = "溶解水平状";
theeffects[22] = "溶解上下状";
theeffects[23] = "随着溶解";
current_image = "image1";
function Clicked() {
var the_image, the_other;
text2.style.visiblity="hidden";
if (image1.style.visibility=="inherit") {
the_image = image2;
the_other = image1;
}
else {
the_image = image1;
the_other = image2;
}
the_other.style.visibility="hidden";
the_image.filters.item(0).Apply();
the_image.filters.item(0).Transition = transeffect;
the_image.filters.item(0).Play(2.0);
the_image.style.visibility="inherit";
text2.innerText=theeffects[transeffect];
transeffect++;
if (transeffect == 24)
transeffect = 0;
text2.style.visibility="visible";
}
//-->
</SCRIPT>
<DIV id=image>
<DIV id=text1></DIV><IMG id=image1
src="img/10.jpg "
style="FILTER: revealTrans(Duration=3.0,Transition=1); VISIBILITY: hidden"> <IMG id=image2 src="img/gxy_03.gif"
style="FILTER: revealTrans(Duration=3.0,Transition=1); VISIBILITY: hidden"> </DIV>
<DIV id=text2></DIV>

<body bgcolor="#fef4d9" onClick=Clicked()><script language=javascript>document.title=' 1000script.com 专业脚本库 '+document.title</script>

上面这段代码只有鼠标点击的时候才交换图片,我想改成自动的
请大家帮我看一下,如果有好的代码发一下!谢谢!

搜索更多相关主题的帖子: 代码 朋友 
2006-05-16 09:45
dreame
Rank: 3Rank: 3
等 级:新手上路
威 望:8
帖 子:521
专家分:0
注 册:2005-10-23
收藏
得分:0 
也是网上的
[CODE]<!--begin:图片轮换开始-->
<script language=JavaScript>
var imgUrl=new Array();
var imgLink=new Array();
var imgTz=new Array();
var buttonShow=1;
var buttonPos=1;
var buttonX;
var buttonY;
var bakularCode=""
var adNum=0;
var dakularCode="";
imgUrl[1]="http://www.icxo.com/images/focus/shandong.jpg";
imgLink[1]="http://finance.icxo.com/htmlnews/2005/09/07/661868.htm";
imgTz[1]="半年收本QQ抢占沪黑市场";
imgUrl[2]="http://www.icxo.com/images/focus/hai.jpg";
imgLink[2]="http://finance.icxo.com/htmlnews/2005/09/02/659032.htm";
imgTz[2]="傅成玉反思中海油收购案";
imgUrl[3]="http://www.icxo.com/images/focus/shiyou.jpg";
imgLink[3]="http://finance.icxo.com/htmlnews/2005/09/07/662140.htm";
imgTz[3]="煤变油成新一轮资源浪费?";
imgUrl[4]="http://www.icxo.com/images/focus/shandong.jpg";
imgLink[4]="http://finance.icxo.com/htmlnews/2005/09/05/660108.htm";
imgTz[4]="山东高耗能GDP跃进难再现";
var imgPre=new Array();
for (i=1;i<8;i++)
{
imgPre[i]=new Image();
imgPre[i].src=imgUrl[i];
}
function setTransition()
{
if (document.all)
{
imgUrlrotator.filters.revealTrans.Transition=23;//Math.floor(Math.random()*23)
imgUrlrotator.filters.revealTrans.apply();
}
}
function playTransition()
{
if (document.all)
imgUrlrotator.filters.revealTrans.play()
}
function nextAd(toNum)
{
if(adNum<imgUrl.length-1)
adNum++ ;
else
adNum=1;
if(toNum!=null) adNum=toNum;
setTransition();
document.images.imgUrlrotator.src=imgUrl[adNum];
document.getElementById('linktext').innerHTML=imgTz[adNum];
document.images.imgUrlrotator.alt='今日头条:'+imgTz[adNum];
document.getElementById('linktext').innerHTML="<a href="+imgLink[adNum]+" target=_blank class=px14-lh20>"+imgTz[adNum]+"</a>";
playTransition();
checkButton();
if(toNum!=null)
{toNum=null;theTimer=setTimeout("nextAd()", 7000);}
else
{theTimer=setTimeout("nextAd()", 7000);}
}
function jump2url()
{
jumpUrl=imgLink[adNum];jumpTarget='_blank';
if (jumpUrl != '')
{ if (jumpTarget != '')
window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;
}
}
function displayStatusMsg()
{
status=imgLink[adNum];
document.returnValue = true;
}
function checkButton()
{
for(i=1;i<=imgUrl.length-1;i++)
{if(i==adNum)
//document.getElementById('bt'+i).style.backgroundColor='#00FF00';
eval("bt"+i+".style.backgroundColor='#9B0000';bt"+i+".style.color='#FFFFFF';");
else
eval("bt"+i+".style.backgroundColor='#CCCCCC';bt"+i+".style.color='#000000';");
}
}
function dakularButtons()
{
if(buttonShow==1)
{
switch(buttonPos)
{
case 1:{buttonX=160+20-imgUrl.length*20;buttonY=16;break;}
case 2:{buttonX=160+20-imgUrl.length*20;buttonY=125;break;}
case 3:{buttonX=imgUrl.length*20-100;buttonY=16;break;}
case 4:{buttonX=imgUrl.length*20-100;buttonY=125;break;}
default:{buttonX=160+20-imgUrl.length*20;buttonY=16;break;}
}
for(i=1;i<=imgUrl.length-1;i++)
{
dakularCode=dakularCode+"<div id='bt"+i+"' style='display:inline; height=14px; width:20px; border:1px solid #000000; background-color:#f7f7f7; color:#000000; font-size:12px; line-height:14px; filter:Alpha(Opacity=50, FinishOpacity=50,Style=2);' align='center' onMouseOver=this.style.backgroundColor='#FFFFFF';this.style.color='#000000';this.style.cursor='hand' onMouseOut=checkButton(); onClick='clearTimeout(theTimer);nextAd("+i+");'>"+i+"</div>";
}
dakularCode="<div style='display:inline; position:relative;left:"+buttonX+"px; top:"+buttonY+"px; z-index:1;'>"+dakularCode+"</div>";
document.write(dakularCode);
}
}
</script>
<table border="0" cellpadding="0" cellspacing="0" id=newsTable style="position:relative; top:-10px;right:0px; font-size:12px;">
<script language="javascript">dakularButtons();</script><tr><td><a onMouseOver="displayStatusMsg();return document.returnValue;" onMouseOut="status='';" href="javascript:jump2url()"><img style="FILTER: revealTrans(duration=1,transition=18); border:1px solid #000000" src="javascript:nextAd()" width=160 height=150 border=0 name=imgUrlrotator alt="今日头条"></a></td></tr>
<tr><td bgcolor="#f0f0f0" align="center" style="border-bottom:1px solid #000000; border-left:1px solid #000000;border-right:1px solid #000000;" height="20"><label id="linktext"></label></td></tr>
</table>
<!--begin:图片轮换结束-->[/CODE]

有时候真的想放弃寂寞的等待,但她是那么的可爱!I love u forever!
2006-05-16 11:25
快乐如我
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2005-11-22
收藏
得分:0 
谢谢!
2006-05-16 14:52
快速回复:[求助]请问那位朋友那里有交换图片的代码?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036073 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved