posts - 0, comments - 77, trackbacks - 0, articles - 356
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

展现幻灯片效果的脚本

Posted on 2006-07-17 15:21 semovy 阅读(1105) 评论(0)  编辑  收藏 所属分类: JavaScript

//// 下段<center>之间的javascript部分放在要放在的<body>
<center><script language="JavaScript">
var elady_step=1; //1:small, 3:middle, 5:big
var elady_speed=20; //20:fast, 50:middle, 80:slow
var e_tp=new Array();
var e_tplink=new Array();
var adNum_elady1=0; 

e_tplink[0]="http://www.baidu.com";
e_tp[0]="images/1.gif";
e_tplink[1]="http://www.google.com.cn";
e_tp[1]="images/2.gif";
e_tplink[2]="http://www.126.com";
e_tp[2]="images/3.gif";
e_tplink[3]="http://www.hao123.com";
e_tp[3]="images/4.gif";

var currentimage=new Array();  

for (i=0;i<e_tp.length;i++){currentimage[i]=new Image();
      currentimage[i].src=e_tp[i];
         }
         function elady1_set(){   if (document.all)
         {      e_tprotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
               e_tprotator.filters.revealTrans.apply();   }
               }
               function elady1_playCo()
               {   if (document.all)      e_tprotator.filters.revealTrans.play()
               }function elady1_nextAd(){   if(adNum_elady1<e_tp.length-1)adNum_elady1++ ;
                     else adNum_elady1=0;
                        elady1_set();
                           document.images.e_tprotator.src=e_tp[adNum_elady1];
                              elady1_playCo();
                                 theTimer=setTimeout("elady1_nextAd()", 4000);}
                                 function elady1_linkurl(){   jumpUrl=e_tplink[adNum_elady1];
                                    jumpTarget='_blank';
                                       if (jumpUrl != ''){      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
                                             else location.href=jumpUrl;
                                                }}
function elady1_listMsg()
{   status=e_tplink[adNum_elady1];
document.returnValue = true;}
document.write("<div id='elady1_divimg' style='position:relative'>");
document.write('<a onMouseOver="elady1_listMsg();return document.returnValue" href="javascript:elady1_linkurl()"

target="_self">');//下面的height表示要显然的图片的高度,width表示要展现的图片的宽度,最好把每一张图片都编缉为已设定要展现的size
document.write('<img style="FILTER: revealTrans(duration=2,transition=20)" height=150 width=150

src="javascript:elady1_nextAd()" border=0 name=e_tprotator onMouseover="elady_stop_sh=1" onMouseout="elady_stop_sh=0"

></a>');
document.write("</div>");
</script></center>
<!--end -->



<!-- 两个以上的必须改变变量 -->

<script language="JavaScript">
var elady_step=1; //1:small, 3:middle, 5:big
var elady_speed=20; //20:fast, 50:middle, 80:slow
var e_tp1=new Array();
var e_tplink1=new Array();
var adNum_elady2=0; 

e_tplink1[0]="http://www.baidu.com";
e_tp1[0]="10-02062004-071855L.gif";
e_tplink1[1]="http://www.baidu.com";
e_tp1[1]="10-11062001-183148L.gif";

var currentimage1=new Array();  
for (i=0;i<=1;i++){currentimage1[i]=new Image();
      currentimage1[i].src=e_tp1[i];
         }
         function elady2_set(){   if (document.all)
         {      e_tprotator1.filters.revealTrans.Transition=Math.floor(Math.random()*23);
               e_tprotator1.filters.revealTrans.apply();   }
               }
               function elady2_playCo()
               {   if (document.all)      e_tprotator1.filters.revealTrans.play()
               }function elady2_nextAd(){   if(adNum_elady1<e_tp1.length-1)adNum_elady2++ ;
                     else adNum_elady2=0;
                        elady2_set();
                           document.images.e_tprotator1.src=e_tp1[adNum_elady2];
                              elady2_playCo();
                                 theTimer=setTimeout("elady2_nextAd()", 3000);}
                                 function elady1_linkurl1(){   jumpUrl=e_tplink1[adNum_elady2];
                                    jumpTarget='_blank';
                                       if (jumpUrl != ''){      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
                                             else location.href=jumpUrl;
                                                }}
function elady1_listMsg1()
{   status=e_tplink1[adNum_elady2];
document.returnValue = true;}
document.write("<div id='elady2_divimg' style='position:relative'>");
document.write('<a onMouseOver="elady1_listMsg1();return document.returnValue" href="javascript:elady1_linkurl1()" target="_self">');//下面的height表示要显然的图片的高度,width表示要展现的图片的宽度,最好把每一张图片都编缉为已设定要展现的size
document.write('<img style="FILTER: revealTrans(duration=2,transition=20)" height=257 width=247 src="javascript:elady2_nextAd()" border=0 name=e_tprotator1 onMouseover="elady_stop_sh=1" onMouseout="elady_stop_sh=0" ></a>');
document.write("</div>");
</script>


<script language="JavaScript">
var elady_step=1; //1:small, 3:middle, 5:big
var elady_speed=50; //20:fast, 50:middle, 80:slow
var e_tp=new Array();
var e_tplink=new Array();
var adNum_elady1=0; 

e_tplink[0]="http://www.baidu.com";
e_tp[0]="10-12082004-121911L.gif";
e_tplink[1]="http://www.baidu.com";
e_tp[1]="22-07012003-067648L.gif";

var currentimage=new Array();  
for (i=0;i<=1;i++){currentimage[i]=new Image();
      currentimage[i].src=e_tp[i];
         }
         function elady1_set(){   if (document.all)
         {      e_tprotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
               e_tprotator.filters.revealTrans.apply();   }
               }
               function elady1_playCo()
               {   if (document.all)      e_tprotator.filters.revealTrans.play()
               }function elady1_nextAd(){   if(adNum_elady1<e_tp.length-1)adNum_elady1++ ;
                     else adNum_elady1=0;
                        elady1_set();
                           document.images.e_tprotator.src=e_tp[adNum_elady1];
                              elady1_playCo();
                                 theTimer=setTimeout("elady1_nextAd()", 4000);}
                                 function elady1_linkurl(){   jumpUrl=e_tplink[adNum_elady1];
                                    jumpTarget='_blank';
                                       if (jumpUrl != ''){      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
                                             else location.href=jumpUrl;
                                                }}
function elady1_listMsg()
{   status=e_tplink[adNum_elady1];
document.returnValue = true;}
document.write("<div id='elady1_divimg' style='position:relative'>");
document.write('<a onMouseOver="elady1_listMsg();return document.returnValue" href="javascript:elady1_linkurl()" target="_self">');//下面的height表示要显然的图片的高度,width表示要展现的图片的宽度,最好把每一张图片都编缉为已设定要展现的size
document.write('<img style="FILTER: revealTrans(duration=2,transition=20)" height=257 width=247 src="javascript:elady1_nextAd()" border=0 name=e_tprotator onMouseover="elady_stop_sh=1" onMouseout="elady_stop_sh=0" ></a>');
document.write("</div>");
</script>


只有注册用户登录后才能发表评论。


网站导航: