javascript clipboard

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);


if (!document.all) return; // IE only

r= text_val.createTextRange();


The html part is:

The above script will select all the text for input field and copy to clipboard (for IE only)