| <?xml version="1.0"?> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <title>Testing Typing into body</title> |
| <script type="text/javascript"> |
| function appendMessage(message) { |
| document.getElementById('result').innerHTML += message + " "; |
| } |
| |
| function appendMessageFromBody(message) { |
| document.getElementById('body_result').innerHTML += message + " "; |
| } |
| </script> |
| </head> |
| |
| <body onkeypress="appendMessageFromBody('keypress')"> |
| <h1>Type Stuff</h1> |
| |
| <div id="result"> |
| |
| </div> |
| |
| <div id="body_result"> |
| |
| </div> |
| |
| |
| <!-- Textbox - to confuse some browsers. --> |
| |
| <form action="resultPage.html" id="on-form"> |
| <input id="intext" |
| onfocus="appendMessage('focus')" |
| onkeydown="appendMessage('keydown')" |
| onkeypress="appendMessage('keypress')" |
| onkeyup="appendMessage('keyup')" |
| onblur="appendMessage('blur')" |
| onchange="appendMessage('change')" |
| /> |
| </form> |
| </body> |
| |