1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[assert] element.id

This commit is contained in:
Witold Filipczyk 2024-04-12 16:17:22 +02:00
parent 298d4cb206
commit 5f74bdd539
2 changed files with 14 additions and 5 deletions

View File

@ -0,0 +1,14 @@
<html>
<body>
<a href="/">inner</a>
<button id="blabla">AAAAA</button>
<button>BBBB</button>
<script>
console.error('element.id.html');
console.assert(document.getElementById('blabla').innerHTML === 'AAAAA', 'AAAAA');
document.getElementsByTagName("A")[0].id = 'test';
console.assert(document.getElementById('test').innerHTML === 'inner', 'inner');
console.exit(0);
</script>
</body>
</html>

View File

@ -1,5 +0,0 @@
<script>
console.assert(0 % 2 === 0, "O is not even");
console.assert(1 % 2 === 0, "1 is not even");
console.exit(0);
</script>