Show off the code for the advertising tape

Source: Internet
Author: User
Tags eval
Tip: You can modify some of the code before running

<p><!--  Written by Myhyli, 2003/07/21. myhyli. --><br/> <!--  Member of the Blueidea Web team. --><br/> <!--  Welcome to Www.111cn.net. --></p> <p> var delta=0.8;<br/>  var collection;<br/>  var; <br/>  function Floaters () {<br/>   this.items = [];<br/>    this.additem = function (id,x,y,content) <br/>       {<br/>       document.write (' <div id= ' +id+ ' style= ' z-index:10; position:absolute;  width:80px; Height:60px;left: ' + (typeof (x) = = ' string '? Eval (x): x) + '; Top: ' + (typeof (y) = = ' string '? Eval (y): y) + ' "> ' +content+ ' </DIV> '); <br/>      <br/>      var newItem     = {};<br/>      newitem.object   = document.getElementById (ID); <br />      newitem.x    = x;<br/>       newitem.y    = y;</p> <p>     this.items[ this.items.length]  = newitem;<br/>      }<br/>    this.play = function () <br/>       {<br/>       collection    = this.items<br/>      setinterval (' Play () ', 30) ; <br/>      }<br/>   }<br/> Play ()   function />   {<br/>    if (screen.width<=800 | | closeb) <br/>    { <br/>     for (var i=0;i<collection.length;i++) <br/>     { <br/>      collection[i].object.style.display = ' none '; <br />     }<br/>     return;<br/>    }<br/ >    for (var i=0;i<collection.length;i++) <br/>    {<br/>      var followobj  = collection[i].object;<br/>     var Followobj_x  = (typeof (collection[i].x) = = ' String ' eval (collection[i].x): collection[i].x); <br/>     var followobj_y  = (typeof (COLLECTION[I].Y) = = ' string '? Eval (COLLECTION[I].Y): COLLECTION[I].Y);</p> <p>    if (followobj.offsetleft!= (document.body.scrollLeft +followobj_x)) {<br/>      var dx= (document.body.scrollleft+followobj_ x-followobj.offsetleft) *delta;<br/>      dx= (dx>0?1:-1) *Math.ceil (dx ) <br/>      followobj.style.left=followobj.offsetleft+dx;<br/>    &Nbsp;  }</p> <p>    if (followobj.offsettop!= (document.body.scrollTop+ followobj_y)) {<br/>      var dy= (document.body.scrolltop+followobj_ y-followobj.offsettop) *delta;<br/>      dy= (dy>0?1:-1) *Math.ceil (DY) ); <br/>      followobj.style.top=followobj.offsettop+dy;<br/>       }<br/>     followobj.style.display = '; <br/>     }<br/>   } <br/>   function closebanner () <br/>   {< br/>    closeb=true;<br/>    return;<br/>   }</p> <p> var thefloaters  = New Floaters (); <br/>  //<br/>   Thefloaters.additem (' FollowDiv1 ', ' document.body.clientwidth-106 ', *, ' <object classid= ' clsid:d 27cdb6e-ae6d-11cf-96b8-444553540000 "codebase=" Http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab "width=" "height=" 233 "><param name=" movie "value=" images/ad-02.swf "><param name=" quality "value=" High "><embed src=" images/ad-02.swf "quality=" High "pluginspage=" Http://www.macromedia.com/go/getflashplayer "type=" application/ X-shockwave-flash "width=" height= "233" ></embed></object><br><br> ') <br/>  thefloaters.additem (' followDiv2 ', 6,80, ' <object classid= ' clsid:d 27cdb6e-ae6d-11cf-96b8-444553540000 "Codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/ Swflash.cab "width=" height= "233" ><param name= "movie" value= "images/ad-02.swf" ><param name= "quality" Value= "High" ><embed src= "images/ad-02.swf" quality= "High" pluginspage= "http://www.macromedia.com/go/" Getflashplayer "type=" Application/x-shockwave-flash "width=" height= "233" ></embed></oBject><br><br> '); <br/>  thefloaters.play (); <br/>  </p> <p>//<a href=http://111cn.net/ MMS target=_blank></a><a href =/news/game/2004/2363.asp></a>< /p>
Tip: You can modify some of the code before running

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.