0

how can i get output of single button on same page at a time in this javascript program

when i click 1st button output appears i want that when i click 2nd button output of 1st disappear and 2nd appears https://code.sololearn.com/WCDDUaUym729/?ref=app

20th Sep 2021, 10:41 AM
Jagbir singh
Jagbir singh - avatar
6 Answers
+ 4
this may help u : https://code.sololearn.com/Wt10HtjRu8Iu use for loop to remove the child for(var remove = 0 ; remove < parent.childNodes.length;remove++){ parent.childNodes[remove].hidden = true }
20th Sep 2021, 10:58 AM
Pariket Thakur
Pariket Thakur - avatar
+ 1
Add the following line after you select parent, parent.innerHTML="";
20th Sep 2021, 10:58 AM
Abhay
Abhay - avatar
+ 1
Jagbir singh Abhay has given u the easyiest way to do so .. i will recomment try Abhay solution
20th Sep 2021, 11:37 AM
Pariket Thakur
Pariket Thakur - avatar
0
dear can you explain working of remove full
20th Sep 2021, 11:25 AM
Jagbir singh
Jagbir singh - avatar