Set focus in input box

I want to be able to set the focus automatically in the next input text box when they click the button…can someone tell me the code for this? thanks