javascript - document.getElementById("ID").focus() + Google Chrome -


document.getelementbyid("id").focus() not work in google chrome. there alternative? thank you.

if you're trying focus can't focused might need add tabindex:

<span id="something" tabindex="0">something</span>  document.getelementbyid("something").focus() 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -