nc.
nc.

Reputation: 7259

How do I get the tab button to focus on a checkbox element in my HTML form?

I tried giving the checkbox a tabIndex but that didn't seem to affect anything.

Upvotes: 0

Views: 1233

Answers (1)

Frankie
Frankie

Reputation: 25165

You have to use javascript in order to do that.

// jquery example
$('#elementid').focus();

A tabindex, like the name says, works for the TAB key.

Upvotes: 1

Related Questions