+ 2
How to make a button appear when another button is pressed?
For instance I want to make a button x And when I click on the button x, I want a button y to appear Can someone help me please 😶
2 Réponses
+ 4
<!--Use it please ↓↓↓ :)-->
<div id ="beta" onclick="B()">some content</div>
<script>
function B() {
var p = document.createElement("button");
var node = document.createTextNode("Click me Please");
p.appendChild(node);
var div = document.getElementById("beta");
div.appendChild(p);
}
</script>
+ 2
Thank you James16
Could you possibly explain please?
It would be very appreciated 😊😶
And how do you stop it from making more than one button