document.getElementById("ID").focus() not work in Google Chrome. Is there any alternative? Thank you.
+1
A:
Apparently it does work, so I'd suggest that you verify that your ID is correct and that document.getElementById() is returning the element that you were expecting.
Miguel Ventura
2010-01-17 16:12:56
+3
A:
If you're trying to focus something that can't normally be focused you might need to add a tabindex:
<span id="something" tabindex="0">Something</span>
document.getElementById("something").focus()
Caleb
2010-01-17 16:19:07