OLD | NEW |
1 <script> | 1 <script> |
2 | 2 |
3 var createNewElement = function (tag, id, text) { | 3 var createNewElement = function (tag, id, text) { |
4 var result = document.createElement(tag); | 4 var result = document.createElement(tag); |
5 result.setAttribute('id',id); | 5 result.setAttribute('id',id); |
6 result.innerHTML = text; | 6 result.innerHTML = text; |
7 return result; | 7 return result; |
8 }; | 8 }; |
9 | 9 |
10 var runTests = function () { | 10 var runTests = function () { |
11 document.getElementById("dt1").insertBefore(createNewElement("summary", "new
1", "new 1"), document.getElementById("summary1")); | 11 document.getElementById("dt1").insertBefore(createNewElement("summary", "new
1", "new 1"), document.getElementById("summary1")); |
12 }; | 12 }; |
13 | 13 |
14 </script> | 14 </script> |
15 | 15 |
16 <body onload="runTests()"> | 16 <body onload="runTests()"> |
17 <details id="dt1"> | 17 <details id="dt1"> |
18 <summary id="summary1">summary</summary> | 18 <summary id="summary1">summary</summary> |
19 </details> | 19 </details> |
20 </body> | 20 </body> |
OLD | NEW |