v podstate by aj toto šlo :)
<html>
<head>
<script>
function vybertext()
{document.getElementById("vybertext").select();}
</script>
</head>
<body>
<textarea id="vybertext">
Ahoj :)
</textarea><br>
<button type="button" onclick="vybertext()">select</button>
</body>
</html>