tags:

views:

327

answers:

4

Is there a way to set the focus in a specific HTML input (a textarea control, actually), without using Javascript?

+6  A: 

Nope. Sadly JavaScript is required, because it's dynamically modifying the browser on the client-side (what JavaScript was made for).

Andrew Dunkman
A: 

I don't know of any, other than tabbing to the field or clicking within it.

RedFilter
A: 

It depends on how and when you want to set the focus on this textarea. "tabindex" might help you.

Alsciende
A: 

You can use autofocus in HTML5 documents, but it has little support at present (see chart).

Tgr