mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04: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>
|