I want to select the textarea field when the user clicks a button. My code is:
<textarea readonly="readonly"> </textarea> <input type="button" value="Code"/>
Jquery Code:
$(function() {
$(input:button').click(function(){
('textarea').select();
});
});
Does not work.
source
share