Marquee is a fixed text rolling label in HTML. Although it is easy to use, there are some functional limitations. In many cases, we use JavaScript to supplement this function. this Code enables constant speed, seamless, link addition, and other modifier effects. This function enables smooth scrolling of text from right to right, you can set the scroll width, height, and speed.
<HTML> <HEAD> <META http-equiv = 'content-type' Content = 'text/html; charset = gb2312 '> <TITLE> JavaScript text moves left </TITLE> </HEAD> <BODY> <script language = "JavaScript1.2"> var marqueewidth = 350 var marqueeheight = 22 var speed = 5 var marqueecontents = '<strong> <big> welcome to the special effect section on the home page, all high-quality special effects are collected! </Big> </strong> 'if (document. all) document. write ('<marquee scrollAmount =' + speed + 'style = "width: '+ marqueewidth +'"> '+ marqueecontents +' </marquee> ') function regenerate () {window. location. reload ()} function regenerate2 () {if (document. layers) {setTimeout ("window. onresize = regenerate ", 450) intializemarquee ()} function intializemarquee () {document.cmarquee01.document.cmarquee02.doc ument. write ('<nobr>' + marqueecontents + '</nobr>') document.cmarquee01.document.cmarquee02.doc ument. close () thelength1_document.cmarquee01.document.cmarquee02.doc ument. width scrollit ()} function scrollit () {if (document.cmarquee01.doc ument. cmarquee02.left> = thelength * (-1) {document.cmarquee01.doc ument. cmarquee02.left-= speed setTimeout ("scrolout ()", 100)} else {document.cmarquee01.doc ument. cmarquee02.left = marqueewidth scrolwidth ()} window. onload = regenerate2 script <ilayer width = & {marqueewidth}; height = & {marqueeheight }; name = "cmarquee01"> <layer name = "cmarquee02"> </layer> </ilayer> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]