mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
16 lines
394 B
HTML
16 lines
394 B
HTML
|
<html>
|
||
|
<head>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div>Selection is HERE only</div>
|
||
|
<script type="text/javascript">
|
||
|
selectedNode = document.getElementsByTagName("div").item(0);
|
||
|
testRange = document.createRange();
|
||
|
|
||
|
testRange.setStart(selectedNode, 13);
|
||
|
testRange.setEnd(selectedNode, 17);
|
||
|
|
||
|
document.body.appendChild(document.createTextNode("Text of Range: "+testRange));
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|