2 <div style=
"background-color: #ddd; font-size: 24pt">
3 <div style=
"width: 100px; display: inline-block">
4 <span id=
"a">aaaa
</span><br>
5 <span id=
"b">bbbb
</span>
6 </div><div style=
"width: 100px; display: inline-block">
7 <span id=
"c">cccc
</span><br>
8 <span id=
"d">dddd
</span>
13 var b
= document
.querySelector('#b'),
14 d
= document
.querySelector('#d');
15 getSelection().setBaseAndExtent(b
.firstChild
, 0, d
.firstChild
, 2);