In sometimes, in html , if you want to select the text for a textbox or a textarea , you can use the following script
function select_all(obj)
{ var text_val=eval(obj);
text_val.focus();
text_val.select();
if (!document.all) return; // IE only
r= text_val.createTextRange();
r.execCommand(\'copy\');
}
function select_all(obj)
{ var text_val=eval(obj);
text_val.focus();
text_val.select();
if (!document.all) return; // IE only
r= text_val.createTextRange();
r.execCommand(\’copy\’);
}
The html part is:
The above script will select all the text for input field and copy to clipboard (for IE only)