mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
23 lines
435 B
HTML
23 lines
435 B
HTML
<ul id="birds">
|
|
<li>Orange-winged parrot</li>
|
|
<li class="endangered">Philippine eagle</li>
|
|
<li>Great white pelican</li>
|
|
</ul>
|
|
|
|
<script type="text/javascript">
|
|
|
|
console.error('nodelist.forEach.html');
|
|
var birds = document.querySelectorAll('li');
|
|
|
|
console.assert(birds.length === 3, 'birds.length');
|
|
|
|
var counter = 0;
|
|
birds.forEach(function(b) {
|
|
counter++;
|
|
});
|
|
console.assert(counter === 3, counter);
|
|
|
|
console.exit();
|
|
|
|
</script>
|