Select all from textarea/ text input on onclick event
Here when an user click on a text link "select all", all the contents of the textarea will be highlighted. You can use onclick event directly on textarea also.
<script type="text/javascript">
function select_all(element1) {
// first set focus
document.frm1.elements[element1].focus();
// select all contents
document.frm1.elements[element1].select();
}
</script>
<form name="frm1">
<a href="#"… (Continue)