en.javascript.info/2-ui/1-document/07-modifying-document/5-why-aaa/task.md
Lavrentiy Rubtsov cc9b015e1b
add quotes
2022-04-30 14:25:34 +06:00

27 lines
452 B
Markdown

importance: 1
---
# Why does "aaa" remain?
In the example below, the call `table.remove()` removes the table from the document.
But if you run it, you can see that the text `"aaa"` is still visible.
Why does that happen?
```html height=100 run
<table id="table">
aaa
<tr>
<td>Test</td>
</tr>
</table>
<script>
alert(table); // the table, as it should be
table.remove();
// why there's still "aaa" in the document?
</script>
```