4 var font = document.getElementById(
"font1");
5 var anchor = document.getElementById(
"anchor1a");
6 var text = document.createTextNode(
"same line as X ");
7 font.insertBefore(text, anchor);
9 font = document.getElementById(
"font2");
10 var table = document.getElementById(
"table2");
11 text = document.createTextNode(
" same line as X");
12 font.insertBefore(text, table);
14 font = document.getElementById(
"font3");
15 anchor = document.getElementById(
"anchor3b");
16 text = document.createTextNode(
"same line as Z ");
17 font.insertBefore(text, anchor);
19 font = document.getElementById(
"font4");
20 table = document.getElementById(
"table4");
21 text = document.createTextNode(
"line before table");
22 font.insertBefore(text, table);
24 font = document.getElementById(
"font5");
25 anchor = document.getElementById(
"anchor5b");
26 text = document.createTextNode(
"line after table ");
27 font.insertBefore(text, anchor);
29 font = document.getElementById(
"font6");
30 table = document.getElementById(
"table6");
31 text = document.createTextNode(
"line before table");
32 font.insertBefore(text, table);
34 font = document.getElementById(
"font7");
35 anchor = document.getElementById(
"anchor7a");
36 var div = document.createElement(
"DIV", null);
37 text = document.createTextNode(
"div before X");
38 div.appendChild(text);
39 font.insertBefore(div, anchor);
41 font = document.getElementById(
"font8");
42 table = document.getElementById(
"table8");
43 div = document.createElement(
"DIV", null);
44 text = document.createTextNode(
"div before table");
45 div.appendChild(text);
46 font.insertBefore(div, table);
48 font = document.getElementById(
"font9");
49 anchor = document.getElementById(
"anchor9b");
50 div = document.createElement(
"DIV", null);
51 text = document.createTextNode(
"div after table");
52 div.appendChild(text);
53 font.insertBefore(div, anchor);
55 font = document.getElementById(
"font10");
56 table = document.getElementById(
"table10");
57 div = document.createElement(
"DIV", null);
58 text = document.createTextNode(
"div before table");
59 div.appendChild(text);
60 font.insertBefore(div, table);
62 font = document.getElementById(
"font11");
63 anchor = document.getElementById(
"anchor11b");
64 div = document.createElement(
"DIV", null);
65 text = document.createTextNode(
"div after table");
66 div.appendChild(text);
67 font.insertBefore(div, anchor);
69 font = document.getElementById(
"font12");
70 table = document.getElementById(
"table12");
71 div = document.createElement(
"DIV", null);
72 text = document.createTextNode(
"div before table");
73 div.appendChild(text);
74 font.insertBefore(div, table);
80 <BODY onload=
"doIt()">
82 <font id=font1
><a id=anchor1a
>X
</a><table id=table1 border
><tr><td>table-
1</td></tr></table><a id=anchor1b
>Z
</a><font>
84 <font id=font2
><a id=anchor2a
>X
</a><table id=table2 border
><tr><td>table-
2</td></tr></table><a id=anchor2b
>Z
</a><font>
86 <font id=font3
><a id=anchor3a
>X
</a><table id=table3 border
><tr><td>table-
3</td></tr></table><a id=anchor3b
>Z
</a><font>
88 <font id=font4
><table id=table4 border
><tr><td>table-
4</td></tr></table><a id=anchor4b
>Z
</a><font>
90 <font id=font5
><table id=table5 border
><tr><td>table-
5</td></tr></table><a id=anchor5b
>Z
</a><font>
92 <font id=font6
><table id=table6 border
><tr><td>table-
6</td></tr></table><font>
95 <font id=font7
><a id=anchor7a
>X
</a><table id=table7 border
><tr><td>table-
7</td></tr></table><a id=anchor7b
>Z
</a><font>
97 <font id=font8
><a id=anchor8a
>X
</a><table id=table8 border
><tr><td>table-
8</td></tr></table><a id=anchor8b
>Z
</a><font>
99 <font id=font9
><a id=anchor9a
>X
</a><table id=table9 border
><tr><td>table-
9</td></tr></table><a id=anchor9b
>Z
</a><font>
101 <font id=font10
><table id=table10 border
><tr><td>table-
10</td></tr></table><a id=anchor10b
>Z
</a><font>
103 <font id=font11
><table id=table11 border
><tr><td>table-
11</td></tr></table><a id=anchor11b
>Z
</a><font>
105 <font id=font12
><table id=table12 border
><tr><td>table-
12</td></tr></table><font>