I have a web page, which I want when I click on a button to activate an html code (I mean more buttons) to make a menu. How can I do that? I have this, but when I click the button, it deletes the whole page and puts only the button that I activate. (It's an example of what I have)
<button onclick=“activar” value=“menu” type=“submit”>
</button>
<script>
function activar(){
Document.write(“<div><button id=‘b1’></button></div>”);
}