<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
html { | |
font: 10px Ahem; | |
-webkit-font-smoothing: none; | |
margin: 0px; | |
} | |
textarea { | |
font: 10px Ahem; | |
-webkit-font-smoothing: none; | |
margin: 0px; | |
position: absolute; | |
left: 200px; | |
top: 250px; | |
} | |
</style> | |
</head> | |
<body> | |
<textarea id='target' class="text" type='text' rows="3" cols="20"> | |
First Line | |
Second Text Row | |
</textarea> | |
<script> | |
function selectRange() { | |
var text = document.getElementById('target'); | |
text.focus(); | |
text.setSelectionRange(1, 3); | |
} | |
</script> | |
</body> | |
</html> | |