A piece of news is rolling up well _ typical special effects

Source: Internet
Author: User
A piece of news is rolling up.

<Html> <pead> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/> <STYLE> TD {FONT-SIZE: 9pt; LINE-HEIGHT: 140%} body, td, th {color: #003366; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif ;} a: link, a: visited {text-decoration: none; color: #008000; font-family: Verdana, Arial, Helvetica, sans-serif;}: hover {text-decoration: none; color: # FF9900; font-family: Verdana, Arial, Helvetica, sans-serif;} A: active {COLOR: #008000; TEXT-DECORATION: none }</STYLE> </pead> <P> script var marqueeContent = new Array (); marqueeContent [0] = 'Today is: wednesday, August 9, 2006; marqueeContent [1] = 'Welcome to our new member {hulianglove} '; </P> <P> marqueeContent [2] =' <B> hottest log: </B> 2005 Super Girl spokesperson Zhang hanyun's growth photo 21:19:02 [lccy] '</P> <P> marqueeContent [3] =' <B> hottest log: </B> Hong Kong and Taiwan three-level film full history (baodian must see) 18:10:20 [lccy] '</P> <P> marqueeContent [4] =' <B> hottest log: </B> Super Girl-Li Yuchun video collection of all songs 13:51:17 [lccy] '</P> <P> marqueeContent [5] =' <B> hottest log: </B> [Seven Swords] free online viewing (also available for free download) 12:18:09 [lccy] '</P> <P> marqueeContent [6] =' <B> most popular log: </B> audio: all Song (online audio and video) of Zhou bichang in Super Girl 13:13:19 [lccy] '</P> <P> marqueeContent [7] =' <B> hottest log: </B> Super Girl-He Jie all songs video collection 19:48:59 [lccy] '</P> <P> marqueeContent [8] =' <B> hottest log: </B> Super Girl-All song video collections of Zhang Liangying 20:05:45 [lccy] '</P> <P> marqueeContent [9] =' <B> hottest log: </B> after the Dormitory Boys play online (full set of super funny) 22:29:19 [lccy] '</P> <P> marqueeContent [10] =' <B> hottest log: </B> Zhou bichang, a Super Girl, sang for Sina users <free> 12:19:19 [lccy] '</P> <P> marqueeContent [11] =' <B> hottest log: </B> 2005 photo of zhanghan Yun, a Super Girl spokesperson, contact [lccy] 'from 19:06:14 </P> <P> var marqueeInterval = new Array (); // define common and frequently used variables var marqueeId = 0; var marqueeDelay = 2000; var marqueeHeight = 17; // The next step is to define some function initMarquee () {var str = marqueeContent [0]; document. write ('<p id = marqueeBox style = "overflow: hidden; height:' + marqueeHeight + 'px" onmouseover = "clearInterval (marqueeInterval [0]) "onmouseout =" marqueeInterval [0] = setInterval (\ 'startmarquee () \ ', marqueeDelay) "> <p> '+ str +' </p> '); marqueeId ++; marqueeInterval [0] = setInterval (" startMarquee ()", marqueeDelay);} function startMarquee () {var str = marqueeContent [marqueeId]; marqueeId ++; if (marqueeId> = marqueeContent. length) marqueeId = 0; if (marqueeBox. childNodes. length = 1) {var nextLine = document. createElement ('div '); nextLine. innerHTML = str; marqueeBox. appendChild (nextLine);} else {marqueeBox. childNodes [0]. innerHTML = str; marqueeBox. appendChild (marqueeBox. childNodes [0]); marqueeBox. scrollTop = 0;} clearInterval (marqueeInterval [1]); marqueeInterval [1] = setInterval ("scrollMarquee ()", 20);} function scrollMarquee () {marqueeBox. scrollTop ++; if (marqueeBox. scrollTop % marqueeHeight = (marqueeHeight-1) {clearInterval (marqueeInterval [1]) ;}} initMarquee (); script </P>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

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.