JavaScript textarea Typewriter effect hint code recommendation _javascript Tips

Source: Internet
Author: User
Tags flush
More good application
<textarea id= "Content" name= "content" cols= "rows=" 5 "class=" text "onchange=" checkcontent () "onclick=" Javascript:flush (); " ></textarea> <script language= "javascript" type= "Text/javascript" > function $ (ID) {return document.getElementById (ID);} var msgall= "A professional collection of high-quality script learning materials website, correcting errors, and strive to create quality script Learning station, we will be attached to the game script resources, source code, software and other information" var msg = "Input the problem content, click" I want to ask questions. " " ; var interval = var Spacelen = 100; var space10= ""; var seq=0; var cont=true function Scroll () {len = msg.length; $ ("content"). Value = msg.substring (0, seq+1); seq++; if (seq >= len) {seq = 0; var per=math.round (Math.random () * (5-1)) +1; Switch (per) {case 1:msg= "cloud-dwelling community www.jb51.net hint information one"; Case 2:msg= "Hint Information 2 cloud-dwelling community www.jb51.net"; Case 3:msg= "Hint information 3 cloud-dwelling community www.jb51.net"; Case 4:msg= "Hint information 4 cloud-dwelling community www.jb51.net"; Case 5:msg= "Hint information 5 cloud-dwelling community www.jb51.net"; } if (cont) {Window.settimeout ("Scroll ();", interval); } else{$ ("content"). value= ""; } else if (cont) {window.settimeout ("Scroll ();", interval); } else{$ ("content"). value= ""; } Scroll (); function Flush () {$ ("content"). value= ""; Cont=false; $ ("content"). Onclick=function () {return void (0);}; } </script>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
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.