Code for text scrolling up and down

Source: Internet
Author: User
Tags setinterval
Tip: you can modify some code before running

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- saved from url=(0026)http://www.alibaba.com.cn/ --><HTML><HEAD><TITLE>Alibaba's world-leading online trading market</tITLE><LINK href="http://img.china.alibaba.com/favicon.ico" rel="shortcut icon"><META http-equiv=Content-Type content="text/html; charset=gb2312"><STYLE type=text/css>BODY {FONT-SIZE: 12px; TEXT-ALIGN: center} UL {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none} DIV. layout_main {MARGIN-TOP: 5px; WIDTH: 900px} DIV. layout_left {FLOAT: left; WIDTH: 427px }. title_01 {PADDING-LEFT: 10px; WIDTH: Pixel px; LINE-HEIGHT: 15px; HEIGHT: 22px! Important; BACKGROUND-COLOR: # ff6600; TEXT-ALIGN: left }. title_01. title_left {BORDER-TOP: # ff6600 6px solid; FONT-WEIGHT: bold; FONT-SIZE: 14px; FLOAT: left; WIDTH: 75px; COLOR: #666666; PADDING-TOP: 4px; HEIGHT: 24px; BACKGROUND-COLOR: # eeeeee; TEXT-ALIGN: center }. title_01. title_right {FONT-SIZE: 12px; FLOAT: right; WIDTH: 360px; COLOR: # ffffff }. content_13 {MARGIN-TOP: 5px; FLOAT: left; MARGIN-BOTTOM: 10px }. content_13 UL {FLOAT: left; WIDTH: Pixel; LINE-HEIGHT: 150% }. content_13 LI {FLOAT: left; HEIGHT: 19px; TEXT-ALIGN: left }. content_13. title {FONT-WEIGHT: bold; WIDTH: 100px; TEXT-ALIGN: left }. content_13. li01 {WIDTH: 100px; TEXT-ALIGN: left }. content_13. li02 {WIDTH: 80px; TEXT-ALIGN: left }. content_13. li03 {WIDTH: 50px; TEXT-ALIGN: left }. content_13. li04 {WIDTH: 170px} # box1left LI {PADDING-LEFT: 5px; PADDING-TOP: 4px; HEIGHT: 19px} # box1leftC {}. gray {COLOR: # cccccc} UL. greyText {BORDER-BOTTOM: # cccccc 1px solid }. greyText LI {TEXT-ALIGN: center} A: link {COLOR: # 3d362b} A: visited {COLOR: # 3d362b} A: hover {COLOR: # ff6600 }# icefable1C {FLOAT: left}</sTYLE><META content="MSHTML 6.00.2900.2963" name=GENERATOR></hEAD><BODY ><DIV class=layout_main>  <!--left/start--><DIV class=layout_left><!--阿里市场/start--><DIV class=title_01 id=title01><DIV class=title_right id=icefable1><DIV id=box1left><UL> <LI><A title=成交总金额\ href="http://page.china.alibaba.com/shtml/exchange/exchannel.shtml?tracelog=auction_sy_rollingmarket" target=_blank>Total recent deals:<SPAN >251553627</sPAN>RMB</a> <A title=成交订单总数 href="http://page.china.alibaba.com/shtml/exchange/exchannel.shtml?tracelog=auction_sy_rollingmarket" target=_blank>Number of Deals:<SPAN >16338</sPAN>Pen</a> </lI> <LI>Tradetable merchants: 5483669 supply and demand information: 9979572</lI> <LI>Latest supply: 1197380 latest purchase: 17708</lI></uL></dIV></dIV></dIV><SCRIPT type=text/javascript>Marque (320,19, "icefable1", "box1left") var scrollElem; var stopscroll; var stoptime; var preTop; var leftElem; var currentTop; var marqueesHeight; function marque (width, height, marqueName, marqueCName) {try {marqueesHeight = height; stopscroll = false; scrollElem = document. getElementById (marqueName); with (scrollElem) {style. width = width; style. height = marqueesHeight; style. overflow = 'den den '; noWrap = true;} scrollElem. onmouseover = new Function ('stopscroll = true'); scrollElem. onmouseout = new Function ('stopscroll = false'); preTop = 0; currentTop = 0; stoptime = 0; leftElem = document. getElementById (marqueCName); scrollElem. appendChild (leftElem. cloneNode (true); init_srolltext ();} catch (e) {}} function init_srolltext () {scrollElem. scrollTop = 0; setInterval ('scrollup () ', 20);} function scrollUp () {if (stopscroll) return; currentTop + = 1; if (currentTop = marqueesHeight + 1) {stoptime + = 1; currentTop-= 1; if (stoptime = (marqueesHeight) * 4) {// pause time currentTop = 0; stoptime = 0 ;}} else {preTop = scrollElem. scrollTop; scrollElem. scrollTop + = 1; if (preTop = scrollElem. scrollTop) {scrollElem. scrollTop = marqueesHeight; scrollElem. scrollTop + = 1 ;}}}</sCRIPT><!--阿里市场/end--><!--报价产品--><DIV class=content_13><UL class=greyText> <LI class=title>Product quotation</lI> <LI class=li02>Unit Price</lI> <LI class=li03>Initial quantity</lI> <LI class=li04>More manufacturers</lI></uL><DIV id=icefable1C><DIV id=box1leftC><UL> <LI class=li01>Student bag</lI> <LI class=li02>RMB 68.00/count</lI> <LI class=li03>200</lI> <LI class=li04>Foshan Yihua Leather Products Co., Ltd.</lI></uL><UL> <LI class=li01>Candy Bag</lI> <LI class=li02>RMB 0.50/count</lI> <LI class=li03>500</lI> <LI class=li04>Ningguo convertible fashion gift firm</lI></uL><UL> <LI class=li01>Liuli ornaments</lI> <LI class=li02>0.50 RMB/grain</lI> <LI class=li03>1000</lI> <LI class=li04>Beijing Orient Henry Jewelry Co., Ltd.</lI></uL><UL> <LI class=li01>Digital camera</lI> <LI class=li02>RMB 895.00/unit</lI> <LI class=li03>2</lI> <LI class=li04>Shenzhen inner Industrial Co., Ltd.</lI></uL><UL> <LI class=li01>So</lI> <LI class=li02>RMB 0.55/entry</lI> <LI class=li03>10</lI> <LI class=li04>Zhuji caotayuejian Knitting Factory</lI></uL><UL> <LI class=li01>Kids clothes</lI> <LI class=li02>RMB 16.00/entry</lI> <LI class=li03>20</lI> <LI class=li04>Huzhou Weili Yi rabbit garment factory</lI></uL></dIV></dIV></dIV><SCRIPT language=JavaScript><!--try{ var marqueesHeightC = 76; var stopscrollC = false; var scrollElemC = document.getElementById("icefable1C"); with(scrollElemC){ style.width = 420; style.height = marqueesHeightC; style.overflow = 'hidden'; noWrap = true; } scrollElemC.onmouseover = new Function('stopscrollC = true'); scrollElemC.onmouseout = new Function('stopscrollC = false'); var preTopC = 0; var currentTopC = 0; var stoptimeC = 0; var leftElemC = document.getElementById("box1leftC"); scrollElemC.appendChild(leftElemC.cloneNode(true)); init_srolltextC();}catch(e) {}function init_srolltextC(){ scrollElemC.scrollTop = 0; setInterval('scrollUpC()', 19);}function scrollUpC(){ if(stopscrollC) return; currentTopC += 1; if(currentTopC == 77) { stoptimeC += 1; currentTopC -= 1; if(stoptime == 10) { currentTopC = 0; stoptimeC = 0; } }else{ preTopC = scrollElemC.scrollTop; scrollElemC.scrollTop += 1; if(preTopC == scrollElemC.scrollTop){ scrollElemC.scrollTop = 0; scrollElemC.scrollTop += 1; } }}//--></sCRIPT><!--市场分类/start--><!--市场分类/end--><!--支付宝交易专区/start--><!--支付宝交易专区/end--><!--行业类目/start--><!--行业类目/start--><!--行业类目/end--><!--行业类目/end--></dIV></dIV><!--left/end--><!--right/start--><!--right/end--><!--左下/start--><!--左下/end--></bODY></hTML>
Tip: you can modify some 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.