Created
October 30, 2017 20:22
-
-
Save alesvaupotic/dd0c6d36ddd5c5e6104bec596d54699b to your computer and use it in GitHub Desktop.
set cursor to the end of a field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
q = document.getElementById('q'); | |
setTimeout(function(){ q.selectionStart = q.selectionEnd = 10000; }, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment