4 function selectLink1() {
5 var selection
= window
.getSelection();
6 var range
= document
.createRange();
7 range
.setStartBefore(document
.getElementById('link1'));
8 range
.setEndAfter(document
.getElementById('link1'));
9 selection
.addRange(range
);
15 google has many links on google.
16 here is a
<a id=
"link1" href=
"http://www.google.com">link
</a>
17 to
<a id=
"link2" href=
"http://www.google.com">google
</a>, where