Drop the letter and keyboard from the top, enter the letter, pass it correctly, and the next letter will know the number of key things written in this game. 1. onkeydown events. 2. onclick events when the mouse is pressed, click 3. vara (Math. random () * 500); Math. random generation of random... syntaxHighligh
Drop a letter from the top, enter a letter on the keyboard, and pass it correctly. The next letter is incorrect.
I know several key things when I write this game.
1. onkeydown event, when the mouse is pressed
2. For the onclick event, click
3. var a = (Math. random () * 500 );
Math. random () randomly generates 0-1 decimal places
4. String. fromCharCode (65 + (a * 100) % 26)
Convert a number to a char letter
5. event. keyCode
The value corresponding to the key pressed by the keyboard.
String. fromCharCode (event. keyCode)
6. setTimeout ("setHeight ()", 20 );
The number of millimeters per call .. Method
As long as you know about these games, the js games are basically the same.
---------------------- The following is my source code, which contains jquery, but the selector is used, so you don't need to thank document. getElementById (), others are useless -------------
<Br/> test <br/>