3 <script src=
"../../../resources/js-test.js"></script>
7 <div name='name1' id='id1'
/>
8 <p name='name3' id='id2'
/>
9 <div name='name2' id='id2'
/>
12 description("Test using id as index of node list");
14 var elems
= document
.getElementsByTagName('div');
16 shouldBe('elems["id1"].getAttribute("name")', '"name1"');
17 shouldBe('elems["id2"].getAttribute("name")', '"name2"');