root/trunk/website/blog/cfformprotect/js/usedKeyboard.js
@
37
| Revision 5, 301 bytes (checked in by DanWilson, 17 years ago) |
|---|
| Line | |
|---|---|
| 1 | var keysPressed = 0; |
| 2 | //capture when a user uses types on their keyboard |
| 3 | document.onkeypress = logKeys; |
| 4 | |
| 5 | function logKeys() { |
| 6 | //user hit a key, increment the counter |
| 7 | keysPressed++; |
| 8 | //load the amount to hidden form field |
| 9 | document.getElementById("formfield1234567892").value = keysPressed; |
| 10 | } |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)