Input.select

For an Input or TextArea element, this will focus the element and select all the text in it.  For instance if your element has "Mezozoic" in it, and you call this:

var eraInput = document.getElementById('era');
eraInput.select();

it would be similar to:

 

var eraInput = document.getElementById('era');
eraInput.focus();
eraInput.setSelectionRange(0, 9999);

Document Tags and Contributors

Tags:
Contributors to this page: Sheppy, vishu_gawli, kscarfone, OsamaBinLogin
Last updated by: kscarfone,