As I was creating the Date of Easter Astronomy Calculator, I was getting annoyed by having to click inside the textbox each time I loaded the web page for testing.  So, I did a Google search and found the command textbox.focus().  The article mentioned people having problems with the command but it worked for me on the first try.