<html>
<head>
<script language="JavaScript">
<!--
function selectText(){
document.myForm.myText.select();
document.myForm.myText.focus();
}
-->
</script>
</head>
<body>
<form name="myForm">
<input type=TEXT value="hello world" name="myText">
<input type=BUTTON value="Click to Select Text" name="myButton" onClick="selectText()">
</form>
</body>
</html>
|