OnClick to select all text in a cell

Dear ALL

How to select all text in a cell by clicking in it ?

I would like to select all text in a cell for fast copying.

Copying 1 cell at a time.

Thanks

If by cell you mean a form element, you could use something like this:

function select_all(id) {
    document.getElementById(id).focus();
    document.getElementById(id).select();
}