两款JAVASCRIPT幻灯片

  
  
  
   New Document
  
  
  
  
  
  
  
  
  
  set time
  
  
  '
  _html += ''
  _html += '';
  _html += '';
  _html += (_t[_c]?('' + (_c+1) + '. ' + _t[_c] + ''):'');
  _html += '';
  _html += "";
  _html += ''; for(var i=0; i'
  + (i>8?(i+1):('0'+(i+1)))+ ' '; _html += "";
  getRef(_o).innerHTML = _html; getRef("rotatorPic").filters[0].Apply();
  getRef("rotatorPic").filters[0].Play(); next();
  }
  else
  {
  _i.src = _p[_c];
  adRotator.load();
  }
  }};
  adRotator.next=function() { with (this)
  {
  (_p.length-1==_c) ? _c=0 : _c++;
  _timeout=window.setTimeout(adRotator.play,_s*1000) ;
  }};
  adRotator.select=function(i) { with (this)
  {
  window.clearTimeout(_timeout);
  _c=i;
  adRotator.play();
  }};
  adRotator.set=function(second) { with (this)
  {
  window.clearTimeout(_timeout);
  if((/\d+/).test(second)==true)
  {
  _s=second;
  adRotator.play();
  }
  else
  {
  alert("must be digit!")
  adRotator.play();
  }
  }};
  function getRef(id)
  {
  return (document.all?document.all(id):document.getElement ById(id));
  }
  adRotator.initialize("AdRotator"); adRotator.add("1.jpg","九网互联幻灯片特效代码","http://www.ninedns.com")
  adRotator.add("2.jpg")
  adRotator.add("3.jpg")
  adRotator.add("4.jpg")
  adRotator.add("5.jpg")
  adRotator.play();
  //-->
  
  
  
  -------------------------------------------------- ------------我是分割线-------------------------------------------------- -----------------
  
  
  
  
  
  JavaScript幻灯片效果
  
  
  
  
  var l=0;
  var sum=0;
  var _c = 0;
  var _i = 0;
  var _v = 0;
  var _l = 0;
  var _fi = 0;
  var _sf = 3000;
  var _HTML = null;
  var _image = null;
  var _mycars= new Array();
  var _w = new Array();
  var _h = new Array();
  var imgs=new Array();
  var limg=new Array();
  /* 渐隐渐现 */
  function transImg(enable){
  document.getElementById("showimg").filters.blendtr ans.Apply();
  document.getElementById("showimg").filters[0].enab led=enable;
  document.getElementById("showimg").filters.blendtr ans.Play();
  }
  /* 加载图片 */
  function chk(){
  l--;
  document.getElementById("rotatorPlayer").innerHTML ='
' + '照片已加载:' + parseInt(((sum-
  l)*100/sum)).toString() + '%'
  if (l==0){
  adRotator.play();
  document.getElementById('stops').disabled='';
  document.getElementById('next').disabled='';
  }
  }
  if (document.images){
  limg[0]=new Image();
  limg[0].src="loading.gif";
  for(var i=0;i'
  if (_v '
  document.getElementById('image').value = _HTML + ',' + _i;
  document.getElementById('rotatorPlayer').innerHTML = _HTML;
  transImg(0);
  transImg(1);
  transImg(0);
  }
  if (_i+1 > _mycars.length)
  {
  document.getElementById('stops').disabled='True';
  document.getElementById('play').disabled='';
  document.getElementById('backs').disabled='';
  document.getElementById('next').disabled='True';
  _i = 0;
  _v = 1;
  }
  }
  /* 播放 */
  function adRotator.play()
  {
  _v = 0;
  _l = 0;
  adRotator.loads();
  }
  /* 下一张 */
  function adRotator.next()
  {
  _l = 1;
  if(_i+1
  
  
  
  
  
  
照片已加载:0%
  

  
  
  
  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值