A certain time scrolling link menu effect _ link effects

Source: Internet
Author: User
<ptml> <pead> <meta http-equiv= "content-language" content= "ZH-CN" > <meta http-equiv= "content-ty PE "content=" text/html; charset=gb2312 "> <title> timed Scrolling link menu </title> <body> <script> var scrollerwidth=115 var scro llerheight=131 var scrollerbgcolor= ' #FFFFFF '//3000 miliseconds=9 seconds var pausebetweenimages=4000 var slideimages =new Array () slideimages[0]= ' your links to your links your link to your link ' slideimages[1]= ' your link to your links to your link ' slideimages[2]= ' your link to your links Link your links to your link ' slideimages[3]= ' your link to your link to your link ' if (slideimages.length>1) i=2 else i=0 function move1 (Whichlayer) {Tlayer=eval (Whichlayer) if (tlayer.top>0&&tlayer.top<=4) {tlayer.top=0 settimeout ("move1 (Tlayer)"), pausebetweenimages) settimeout ("Move2 (Document.main.document.second)", pausebetweenimages) return} if (tlayer.top >=tlayer.document.height*-1) {tlayer.top-=4 settimeout ("move1 (Tlayer)", MB)} else{tlayer.top=scrollerheight TLayer.document.write (Slideimages[i]) tlayer.document.close () if (i==slideimages.length-1) i=0 else i++}} functi On Move2 (Whichlayer) {tlayer2=eval (Whichlayer) if (tlayer2.top>0&&tlayer2.top<=4) {tlayer2.top=0 SetTimeout ("Move2 (Tlayer2)", pausebetweenimages) settimeout ("Move1 (Document.main.document.first)", Pausebetweenimages) return} if (tlayer2.top>=tlayer2.document.height*-1) {tlayer2.top-=4 settimeout ("Move2 R2)} else{tlayer2.top=scrollerheight Tlayer2.document.write (slideimages[i)) Tlayer2.document.close () if (i== SLIDEIMAGES.LENGTH-1) i=0 Else i++}} function Move3 (whichdiv) {tdiv=eval (Whichdiv) if (tdiv.style.pixeltop>0 &&tdiv.style.pixeltop<=4) {tdiv.style.pixeltop=0 settimeout ("Move3 (Tdiv)", pausebetweenimages) SetTimeout ("Move4 (Second2)", pausebetweenimages) return} if (tdiv.style.pixeltop>=tdiv.offsetheight*-1) { Tdiv.style.pixeltop-=4 settimeout ("Move3 (Tdiv)", M)} else{Tdiv.style.pixeLtop=scrollerheight Tdiv.innerhtml=slideimages[i] if (i==slideimages.length-1) i=0 else i++}} function Move4 (wh Ichdiv) {tdiv2=eval (Whichdiv) if (tdiv2.style.pixeltop>0&&tdiv2.style.pixeltop<=4) { Tdiv2.style.pixeltop=0 settimeout ("Move4 (TDIV2)", pausebetweenimages) settimeout ("Move3 (First2)", Pausebetweenimages) return} if (tdiv2.style.pixeltop>=tdiv2.offsetheight*-1) {tdiv2.style.pixeltop-=4 setTimeout ("Move4 (Second2)", 100)} else{Tdiv2.style.pixeltop=scrollerheight Tdiv2.innerhtml=slideimages[i] if (i==slideimages.length-1) i=0 else i++ }} function Startscroll () {if (document.all) {move3 (first2) Second2.style.top=scrollerheight} else if (document. Layers) {move1 (Document.main.document.first) document.main.document.second.top=scrollerheight+5 Document.main.document.second.visibility= ' Show '} window.onload=startscroll if (document.layers) document.write (s Lideimages[0]) if (document.layers) document.write (slideimages[1] if (document.layers) document.write (Slideimages[0]) if (document.all) {Document.writeln (' <span id= ' main2 "+SC") rollerwidth+ '; height: ' +scrollerheight+ '; Overflow:hiden;background-color: ' +scrollerbgcolor+ ' > ' Document.writeln (' <div +scrollerwidth+ '; height: ' +scrollerheight+ '; clip:rect (0 ' +scrollerwidth+ ' + scrollerheight+ ' 0); left:0;top:0 ">") Document.writeln (' <div id= "First2" +scrollerwidth+ "; left:0;top:1;" > ') document.write (Slideimages[0]) Document.writeln (' </div> ') Document.writeln (' <div id= ' Second2 "+ scrollerwidth+ '; left:0;top:0 ' > ') document.write (slideimages[1]) Document.writeln (' </div> ') Document.writeln (' </div> ') document.writeln (' </span> ')} </script> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.