Edit The Code:
See Result »
Try it Yourself - ©
w3ii.com
In this example, the text field gets focus immediately after the document window has been loaded.