Focusing To A Div Aftering Rendering

Hello, Can any body tell me how can i focus to a div after rendering?

Now i am using like this.


and i used javascript to focus to the "div2" on the view file "index".

Is there any other option?

No, you’ll need to use javascript.

For non-IE support, you could look at this HTML 5 attribute: