mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
34 lines
635 B
HTML
34 lines
635 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.text {
|
|
font-family: courier;
|
|
font-size: 12px;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
border: 0px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<textarea id='target' class="text" type='text' rows="3" cols="20">
|
|
First Line
|
|
Second Text Row
|
|
</textarea>
|
|
<script>
|
|
function selectCaret() {
|
|
var text = document.getElementById('target');
|
|
text.focus();
|
|
text.setSelectionRange(17, 17);
|
|
}
|
|
function selectRange() {
|
|
var text = document.getElementById('target');
|
|
text.focus();
|
|
text.setSelectionRange(1, 3);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|