+ 1
html conditional button
how can we create a button that when we click on it create another button for me on the page like plus sign in some panels whom you can create a new directory for a new table or project
1 Réponse
+ 1
You can use event listner to your first button ex “onclick” myFun()
When you click the button this calls the function myFun()
In myFun() first remove that button (hope you know how to remove using parentChild.removeElement())
After that creates a new button (createElement) , set id using setAttribute() Method.
Thats It, once id is set you can do whatever you want to do work with this button