0

Button after Button

alert("I\'m making a code that is like there's a button what is named forbidden.") alert("But now I want that I click the button and the button shows another button") alert("So how do I add the another button it shouldn't have shown before I have clicked the first button") alert ("like I am clicking the button named forbidden but now after I have clicked the button it shows another button but the name isn't forbidden, it's click me") Better version of text: https://code.sololearn.com/WHJOqV5iiMTX/?ref=app

8th Dec 2022, 12:14 PM
MikroMick
MikroMick - avatar
6 odpowiedzi
+ 3
There is a tutorial about adding elements programmatically in "DOM & Events" chapter, lesson number 48.1
8th Dec 2022, 1:58 PM
Ipang
+ 1
Here is an example of how you can create a "forbidden" button that reveals another button when clicked, using HTML and JavaScript: https://code.sololearn.com/WTDNUh6A6LP3/?ref=app When the page loads, only the "forbidden" button will be visible. When the user clicks the "forbidden" button, the "click me" button will be revealed.
8th Dec 2022, 3:11 PM
Calviղ
Calviղ - avatar
+ 1
Ipang Can you send a link because I cannot find DOM & Events 😓 (I thought it was in HTML CSS or Javascript but I cannot find per search)
9th Dec 2022, 12:42 AM
MikroMick
MikroMick - avatar
+ 1
Here it is https://www.sololearn.com/learn/JavaScript/2755/?ref=app Idk why you don't see it, but from my part it's in Javascript tutorial
9th Dec 2022, 1:40 AM
Ipang
0
Calviղ your answer is very good but I have expected another Answer. You're doing great do not think negative.
9th Dec 2022, 12:32 AM
MikroMick
MikroMick - avatar
0
Calviղ this is my actually code https://code.sololearn.com/WcPgPin2IkFa/?ref=app please read more if you have test the code. ||| Like you have seen there is you are not going to do that again so there under this text should be another button but you can't see the button named forbidden anymore.
9th Dec 2022, 1:05 PM
MikroMick
MikroMick - avatar