JS Typewriter effect

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

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <title>js Typewriter effect </title> <meta http-equiv= "Content-type" content= "text/html;charset=gb2312" > <!--Add the following code to <pead> and </pead>- > <style type= "text/css" >/* Global style * * *{padding:0;margin:0;} a img{border:0;} body{font-family: "XXFarEastFont-Arial"; font-size : 12px;color: #000;} /* Global style End/#right_b {Float:right;width:222px;height:auto}. Box{color: #FF0000; font-size:14px;} #message {Float:left ; width:220px;height:341px;border:1px solid #1e59bb; margin-top:10px;} . Message_title{width:220px;height:28px;background:url (/effect/images/201009101410//201009101410/personal_51. GIF) repeat-x;margin-bottom:8px;} . Message_title H2{font-weight:bold;color: #FFF; line-height:28px;padding-left:12px;} #message p{float:left;width : 200px;margin:5px 0 0 10px;display:inline;line-height:20px;background:url () repeat-x CENter bottom;padding-bottom:5px;color: #666;} #message p.txt_region{background:none;margin-top:15px} #message p.txt_region2{background:none} #message P A{color: #0058af; text-decoration:none;} #message P A:hover{color: #ff6600 text-decoration:underline;} </style> <script language= "JavaScript" > var max=0; function textlist ()//own object, storing string {max=textlist.arguments.length; for (i=0; i<max; i++) this[i]=textlist.arguments[i]; } tl=new textlist ("Please fill in your message here");/is actually a multidimensional array of Var x=0;pos=0;var t,m; var l=tl[0].length; function Textticker () {document.form1.textfeld.value=tl[x].substring (0,pos) + "_"; if (pos++==l) {pos=0; t = settimeout ("Textticker ()", 1000);//control the conversion time between two paragraphs x + +; if (X==max) x=0; L=tl[x].length; else M = settimeout ("Textticker ()", 130);//Control text display time} </script> </pead> <!--change <body> to--> ; Body onload= "Textticker ()" > <!--Add the following code to <body> and &LT;/BODY&Gt;--> <div id= "Body_mian" > <div id= "Mian" > <div id= "Right" > <div id= "Right_b" > <div id= "message" > <div class= "message_title" ><p> fill in messages </p></div> <form name= "Form1" method= "get" > <p class= "txt_region" ><textarea onfocus= "cleartimeout" (t); Timeout (m); This.value= '; "Name=" Textfeld "cols=" rows= "8" class= "box" type= "Text" >
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.