JavaScript Reference/Javascript Methods/select
Версия от 18:30, 25 мая 2010; (обсуждение)
"select()" Example
<html>
<body>
<script language="JavaScript">
function function1() {
var m = document.body.createTextRange();
m.findText(""test"");
m.select();
}
</script>
<p>Search the "test" word in this paragraph</p>
<button onclick="function1();">Find test</button>
</body>
</html>
"select()" is applied to
Names noted with an asterisk (*) are JavaScript properties only.
+----------------+--------------------------------------------------------------+
| Applied_To |controlRange* TextRange |
+----------------+--------------------------------------------------------------+
"select()" Syntax, Parameters and Note
Note:
Highlight the specified object.
Syntax:
controlRangeName.select()
textRangeName.select()