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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -