js focus on input element

Hi. I have text in a span, which upon mouseClicked() is to be replaced with an input field containing the value of this text for editing. I would like to have the input field focused and the text selected upon creation of the element, however the usual element.focus() and element.select() are not working.

Thanks in advance,

Dylan

Tagged:

Answers

Sign In or Register to comment.