mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
23 lines
423 B
HTML
23 lines
423 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<body>
|
||
|
<p class="a">Class a.</p>
|
||
|
<p class="b">Class b.</p>
|
||
|
|
||
|
<script>
|
||
|
function myFunction() {
|
||
|
var x = document.querySelectorAll('.nonexistent');
|
||
|
console.assert(x.length === 0, 'nonexistent elements');
|
||
|
|
||
|
var y = document.querySelectorAll('p');
|
||
|
console.assert(y.length === 2, 'Two p');
|
||
|
}
|
||
|
|
||
|
console.error('document.querySelectorAll.html');
|
||
|
myFunction();
|
||
|
console.exit(0);
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|