mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-19 01:36:33 -04:00
11 lines
240 B
HTML
11 lines
240 B
HTML
|
<script>
|
||
|
const div = document.createElement("div");
|
||
|
const p = document.createElement("p");
|
||
|
div.appendChild(p);
|
||
|
const span = document.createElement("span");
|
||
|
p.replaceWith(span);
|
||
|
|
||
|
alert(div.outerHTML); //'<div><span></span></div>'
|
||
|
|
||
|
</script>
|