html - How to select an INPUT element with Javascript -


i don't know term, it's when have non empty html input text while focus on before input's tabindex, hit tab key, has blue selection around text.

how do javascript?

i think mean "selection". @ javascript dom functions select() , focus(). e.g.

<input type="text" id="mytextbox" />  <script type="text/javascript">      var mytextbox = document.getelementbyid('mytextbox');     mytextbox.select();     mytextbox.focus();  </script> 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -