I would like to replace an entire block of HTML in my page using JavaScript:
<html>
<input type="number" id="totale">
<br>
<button onclick="primo();">esegui</button>
<ul>
<li id="figlio"></li>
<li id="figlia"></li>
<li id="genitori"></li>
</ul>
<html>
I would like to replace the entire block of the <ul>
element with a paragraph element (<p>
). How can I do this?