Test your typing speed

Source: Internet
Author: User

<SCRIPT>
MSG = new array ("practicing with your typing can greatly help your overall computer skills .",
"A new computer is sold in the US every hour! ",
"When do birds migrate from north to south? ",
"Perplexing phrases, like this one, are tougher to type .")

WORD = 10
Function M (){
MSG = new array ("practicing with your typing can greatly help your overall computer skills .",
"A new computer is sold in the US every hour! ",
"When do birds migrate from north to south? ",
"Perplexing phrases, like this one, are tough to type .")
WORD = 10}
Function E (){

MSG = new array ("if you can correctly, and quickly, type this perplexing sentence, you are one superb typist! ",
"You are one superb typist if you can correctly, and quickly, type this long phrase .",
"I believe you're a good typist, so I believe you will correctly copy this statement! ",
"Because this is not a fairly simple phrase, cocould you swiftly, and precisely, copy it? ")
WORD = 15}
Function S (){
MSG = new array ("computers are the medium of the future .",
"Can you type this phrase rather quickly? ",
"Who is the president of the US? ",
"I believe that you can type well! ")
WORD = 7}
Function beginit (){
Randnum = math. Floor (math. Random () * 10) % 4
Msgtype = MSG [randnum]
Day = new date ();
Starttype = day. gettime ();
Document. theform. Given. value = msgtype
Document. theform. typed. Focus ();
Document. theform. typed. Select ();}
Function cheat (){
Alert ("sorry, you cannot change the content here !! ");
Document. theform. typed. Focus ();}
Function stopit (){
VaR mysms = []
Mysms [0] = "you are a bad guy. It's so slow to type! ";
Mysms [1] = "it's really bad. You need to do more exercises! ";
Mysms [2] = "coming soon, I believe you will make progress! ";
Mysms [3] = "pretty good, promising! ";
Mysms [4] = "Great! You taught me well! ";
Mysms [5] = "you are really a master. You have never been there before, but you have never been here! ";
Mysms [6] = "Welcome to test! ";
Daytwo = new date ();
Endtype = daytwo. gettime ();
Totaltime = (endtype-starttype)/1000)
SPD = math. Round (word/totaltime) * 60)
If (document. theform. typed. value = Document. theform. Given. Value ){
Alert ("\ n you entered" + word + "characters, in"
+ Totaltime + "seconds, the speed is" + Spd + "characters per minute! ");
VaR AA = Document. getelementbyid ("SMS ");
If (Spd <3 ){
AA. innertext = mysms [0];
} Else if (Spd >=3 & SPD <10 ){
AA. innertext = mysms [1];
} Else if (Spd >=10 & SPD <20 ){
AA. innertext = mysms [2];
} Else if (Spd >=20 & SPD <30 ){
AA. innertext = mysms [3];
} Else if (Spd >=30 & SPD <200 ){
AA. innertext = mysms [4];
} Else if (Spd> = 200 ){
AA. innertext = mysms [5];
} Else {
AA. innertext = mysms [6];
}
}
Else {
Alert ("You entered a mistake, but you entered" + Spd + "characters .")}}
</SCRIPT> <form name = "theform">
<Table border = 3 cellspacing = 0 cellpadding = 0>
<Tr>
<TD> <span id = "SMS"> you are a... </span> </TD>
<TD align = center> <input type = radio name = "SME" value = "Beginner" onclick = "s ()" Checked> beginner
<Input type = radio name = "SME" value = "Novice" onclick = "m ()"> intermediate
<Input type = radio name = "SME" value = "expert" onclick = "E ()"> advanced </TD>
</Tr>
<Tr> <TD colspan = 2> <br>
<Center> <input type = button value = "Start test" name = "start" onclick = "beginit ()"> </center> <p>
<Textarea name = "given" Cols = 53 rows = 3 wrap = on onfocus = "cheat ()"> </textarea> </TD>
</Tr>
<Tr> <TD colspan = 2> <center> <input type = text name = "typed" size = 45>
<Input type = button value = "name" name = "stop" onclick = "stopit ()"> </center> </TD>
</Tr>
</Table> </form>

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.