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
Post a Comment