[javascript] how to auto select an input field and the text in it on page load