»
Tiếng AnhTiếng PhápTiếng Việt

In - Luyện tốc độ đánh máy - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Trò chơi » Kĩ năng » Luyện tốc độ đánh máy
URL: http://www.javascriptbank.com/typing-test.html

Luyện tốc độ đánh máy © JavaScriptBank.comTrò chơi JavaScript sẽ giúp bạn lue65y tốc độ đánh máy.

Phiên bản đầy đủ: jsB@nk » Trò chơi » Kĩ năng » Luyện tốc độ đánh máy
URL: http://www.javascriptbank.com/typing-test.html



JavaScript
<script language="JavaScript"><!-- Begin// Michael Tartaglia (stonedstan@hotmail.com)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 = 10function 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, could 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)) % 4msgType = msg[randNum]day = new Date();startType = day.getTime();document.theForm.given.value = msgTypedocument.theForm.typed.focus();document.theForm.typed.select();}function cheat() {alert("You can not change that!");document.theForm.typed.focus();}function stopIt() {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("\nYou typed a " + word + " word sentence in " + totalTime + " seconds, a speed of about " + spd + " words per minute!")}else {alert("You made an error, but typed at a speed of " + spd + " words per minute.")   }}// End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="theForm"><table border="3" cellspacing="0" cellpadding="0"><tbody><tr><td>Are you a....</td><td align="center"><input type="radio" name="sme" value="Beginner" onclick="s()" checked="checked">Beginner<input type="radio" name="sme" value="Novice" onclick="m()">Novice<input type="radio" name="sme" value="Expert" onclick="e()">Expert</td></tr><tr><td colspan="2"><br><center><input type="button" value="Start Typing Test" name="start" onclick="beginIt()"></center><p><textarea name="given" cols="53" rows="3" wrap="on" onfocus="cheat()"></textarea></p></td></tr><tr><td colspan="2"><center><input type="text" name="typed" size="45"><input type="button" value="DONE" name="stop" onclick="stopIt()"></center></td></tr></tbody></table></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->