mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
10 lines
264 B
HTML
10 lines
264 B
HTML
<script>
|
|
var div = document.createElement("div");
|
|
var p = document.createElement("p");
|
|
p = div.appendChild(p); // TODO without assignment
|
|
var span = document.createElement("span");
|
|
p.replaceWith(span);
|
|
alert(div.outerHTML); //'<div><span></span></div>'
|
|
|
|
</script>
|