mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
21 lines
384 B
HTML
21 lines
384 B
HTML
<div>
|
|
<span>first span</span>
|
|
</div>
|
|
<div>
|
|
<h5>Original content</h5>
|
|
<p>
|
|
inside paragraph
|
|
<span>inside span</span>
|
|
inside paragraph
|
|
</p>
|
|
</div>
|
|
<div>
|
|
<h5>Output</h5>
|
|
<div id="output"></div>
|
|
</div>
|
|
|
|
<script>
|
|
var baseElement = document.querySelector("p");
|
|
document.getElementById("output").innerHTML =
|
|
(baseElement.querySelector("div span").innerHTML);
|
|
</script> |