随机幻灯片图片效果

来源:互联网 发布:guide编程 编辑:程序博客网 时间:2024/04/29 07:37
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

<script>
<!--
//////////////////////////////////////////////////////////////////
// 闪烁图片    //
//第 7,8,9 行更改总体设置 第 65 行开始加入自定义内容 //
//将JS嵌入到显示的固定位置   //
//2006.02.10 V1.00 By Clear for PPLive.com  //
//////////////////////////////////////////////////////////////////
var intSTime = 4000;//定义图片轮换时间
var intSWidth = 240;//定义图片宽度,单位:像素
var intSHeight = 180;//定义图片高度,单位:像素
var collectSAd;
var adNum = 0
function slectImg(){
 this.items = [];
 this.addItem = function(adURL,strURL,strBak,intChMode,intTarget){
  var newItem  = {};
  newItem.adURL = adURL;
  newItem.strURL = strURL;
  newItem.strBak = strBak;
  newItem.intChMode = intChMode;
  newItem.intTarget = intTarget;
  this.items[this.items.length] = newItem;
 }
 this.play = function(){
  collectSAd = this.items
  strHtml()
  nextAd()
 }
}
function setTransition(){
if (document.all){
  if(collectSAd[adNum].intChMode == ""){
bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);
}else{
   bannerADrotator.filters.revealTrans.Transition=collectSAd[adNum].intChMode;
  }
   bannerADrotator.filters.revealTrans.apply();
}
}
function playTransition(){
if (document.all)
bannerADrotator.filters.revealTrans.play()
}
function nextAd(){
adNum<collectSAd.length-1?adNum++:adNum=0;
setTransition();
document.images.bannerADrotator.src=collectSAd[adNum].adURL;
playTransition();
  document.images.bannerADrotator.alt=collectSAd[adNum].strBak;
theTimer=setTimeout("nextAd()", intSTime);
}
function jump2url(){
jumpUrl=collectSAd[adNum].strURL;
if (jumpUrl != ''){
if(collectSAd[adNum].intTarget != "")window.open(jumpUrl,collectSAd[adNum].intTarget);
else location.href=jumpUrl;
}
}
function displayStatusMsg() {
status=collectSAd[adNum].strURL;
document.returnValue = true;
}
function strHtml(){
 document.write("<a onmouseover=/"displayStatusMsg();return document.returnValue/" href=/"javascript:jump2url()/"><img src=/"javascript:nextAd()/" name=/"bannerADrotator/" width=/""+intSWidth+"/" height=/""+intSHeight+"/" border=/"0/" style=/"filter: revealTrans(duration=2,transition=20)/"></a>")
}
var theSlectImg = new slectImg();
theSlectImg.addItem("http://www.alixixi.com/alixixi.gif","http://www.alixixi.com","图片1","","")
theSlectImg.addItem("http://www.alixixi.com/MyZONE-Logo.jpg","http://www.alixixi.com","图片2","","")
theSlectImg.addItem("http://www.alixixi.com/images/ASP.jpg","http://www.alixixi.com","图片3","","")
theSlectImg.play()
//使用方法:
//首先修改7,8,9行总体设置
//然后重复调用控件:
//theSlectImg.addItem(adURL,strURL,strBak,intChMode,intTarget)
//adURL 定义图片路径
//strURL 定义图片链接
//strBak 定义图片出错时的备用提示
//intChMode 定义图片更换方式,范围为0-23,(详细效果查询CSS指南),为空时显示随机效果
//intTarget 定义广告弹出方式,为空时在本页显示,可选参数"_blank","_self","_top","_parent"
//-->

</Script>

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击