一端时间轮换的广告

2016-02-19 12:54 1 1 收藏

图老师设计创意栏目是一个分享最好最实用的教程的社区,我们拥有最用心的各种教程,今天就给大家分享一端时间轮换的广告的教程,热爱PS的朋友们快点看过来吧!

【 tulaoshi.com - Web开发 】

SCRIPT language=JavaScript
var dde_para = new Array();
var dde_aa   = new Array();
var dde_url  = document.location.href;
var dde_pp   = dde_url.split("#")[1];
var jspfile  = 1;
var para     = null;

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/webkaifa/)

//滚动页面的宽
var scrollwidth = 705;

//滚动页面的高
var scrollheight = 120;

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/webkaifa/)

if(dde_pp!=null && dde_pp.length0){
  dde_para = dde_pp.split("&");}
  for(i=0; dde_para!=null && idde_para.length;i++){
  dde_aa = dde_para[i].split("=");
  eval("var "+dde_aa[0] +"='"+dde_aa[1]+"'");}
var car_num = 5;
var i=1;
//默认滚动时间10秒
var pausebetweenimages=800 * 8;
var slideimages=new Array();
//滚动页面1的URL
slideimages[0]="iframe border=0 vspace=0 hspace=0 bgcolor=#888888 Name=union163com align=center marginwidth=0 marginheight=0 framespacing=0 frameborder=0 scrolling=no width="+scrollwidth+" height="+scrollheight+" src='http://news.qq.com/photon/08photojdlm1.htm'/iframe";
//滚动页面2的URL
slideimages[1]="iframe border=0 vspace=0 hspace=0 bgcolor=#888888 Name=union163com align=center marginwidth=0 marginheight=0 framespacing=0 frameborder=0 scrolling=no width="+scrollwidth+" height="+scrollheight+" src='http://news.qq.com/photon/08photojdlm2.htm'/iframe";
function move1(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop0&&tdiv.style.pixelTop=car_num){
tdiv.style.pixelTop=0
setTimeout("move1(tdiv)",pausebetweenimages)
setTimeout("move2(second2)",pausebetweenimages)
return}
if (tdiv.style.pixelTop=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=car_num
setTimeout("move1(tdiv)",50)}
else{
tdiv.style.pixelTop=scrollheight
tdiv.innerHTML=slideimages[0]
if (i==slideimages.length-1)
i=0
else i++}}
function move2(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop0&&tdiv2.style.pixelTop=car_num){
tdiv2.style.pixelTop=0
setTimeout("move2(tdiv2)",pausebetweenimages)
setTimeout("move1(first2)",pausebetweenimages)
return}
if (tdiv2.style.pixelTop=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=car_num
setTimeout("move2(second2)",50)}
else{
tdiv2.style.pixelTop=scrollheight
tdiv2.innerHTML=slideimages[1]
if (i==slideimages.length-1)
i=0
else i++}}
function conmouse(){car_num=0;}
function cmouseout(){car_num=5;}
function startscroll(){
if (document.all){
move1(first2)
second2.style.top=scrollheight
}
else if (document.layers){
move1(document.main.document.first)
document.main.document.second.top=scrollheight+5
document.main.document.second.visibility='show'}}
//--
/SCRIPT
  ILAYER id=main height="&{scrollheight};"
      width="&{scrollwidth};"
  LAYER name="first" left="0"
      top="1" width="&{scrollwidth};" id=first
  SCRIPT language=JavaScript1.2
if (document.layers)
document.write(slideimages[0])
/SCRIPT
  /LAYER
  LAYER id=second width="&{scrollwidth};" top="0" left="0"
      visibility="hide"
  SCRIPT language=JavaScript1.2
if (document.layers)
document.write(slideimages[1])
/SCRIPT
  /LAYER
  /ILAYER
  script language=JavaScript1.2
if (document.all){
document.writeln('span id="main2" style="position:relative;width:'+scrollwidth+';height:'+scrollheight+';overflow:hiden;background-color:#ffffff"')
document.writeln('div onMouseOver="conmouse()" onMouseOut="cmouseout()" style="position:absolute;width:'+scrollwidth+';height:'+scrollheight+';clip:rect(0 '+scrollwidth+' '+scrollheight+' 0);left:0;top:0"')
document.writeln('div id="first2" style="position:absolute;width:'+scrollwidth+';left:0;top:1;"')
document.write(slideimages[0])
document.writeln('/div')
document.writeln('div id="second2" style="position:absolute;width:'+scrollwidth+';left:0;top:0"')
document.write(slideimages[1])
document.writeln('/div')
document.writeln('/div')
document.writeln('/span')}
startscroll();
/script

来源:https://www.tulaoshi.com/n/20160219/1602360.html

延伸阅读
标签: 办公软件
一、 Excel时间计算的基础 和日期一样,Excel处理时间的方式并不像我们看到的那样——时间是由小时、分钟和秒钟组成的,有特殊格式的数据。Excel 在内部把每 24 小时的时间周期作为一个从 0 至 1的小数存储(图 1)。 图" 1 说明:把A列中的时间数据复制到C列,然后通过“单元格格式”对话框,将C列的格式设置为“常规”即可看到如图所示的...
1:芋头去皮 2:切开 3:电压力锅中,先放入玉米,在放上蒸帘 4:将红薯和芋头放上。加入水,按下煮粥键 5:熟了 6:取出,即可。                                             &nbs...
互联网移动化     互联网的移动化趋势似乎已经成为一种共识。在这种趋势背后,需要各行各业领导者深入思考的问题有很多,比如2017年网络移动化发展的程度有多深以及对用户搜索意味着什么,比如企业该如何调整原有的网络营销策略,又比如企业该如何顺应各大搜索引擎向“移动端优先”索引规则的改变而相应地搭建企业网站和...
一号专车司机端注册教程   1、下载一号专车司机端最新版。 2、安装并进入到一号专车司机端软件中。 3、首先进入到的是填写手机号码的界面,如实填写手机号,接单的话很重要哦! 4、完成手机验证之后,进入到个人资料完善界面,如实完整填写个人资料。 5、上传相关证件的照片,要求清晰且真实。有身份证,...

经验教程

827

收藏

10
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部