mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[assert] element.id
This commit is contained in:
parent
298d4cb206
commit
5f74bdd539
14
test/ecmascript/assert/element.id.html
Normal file
14
test/ecmascript/assert/element.id.html
Normal 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>
|
@ -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>
|
|
Loading…
Reference in New Issue
Block a user