1 | The following example illustrates some simple form elements with onFocus and onClick event handlers: |
2 | <form> |
3 | <input type="text" name="data" size=30 |
4 | onFocus="window.status='this is a test of onFocus'; return true"> |
5 | <input type="submit" value="clickit!" onClick="top.dosomething('This is a test of onClick')"> |
6 | </form> |
7 | window.status is a property holding message at bottom of browser window |
8 | One would typically have onChange handler as well in text field. Note that with these handlers one does NOT necessarily need server-side CGI script to process form |