0
How to add to html program like if we press a button something will come but we have to use 2 div id like <div="a">h</div> and
<div id="b"> ..if we press h word of div 2 will display are you understanding i want to make a button which when pressed show the value of div id="b" like i want to use get inner html byit with the div id so it can display another word onclick the button so i can make a super program using button display. Please help me !!!
3 odpowiedzi
+ 3
Explanation:
1) Add onclick attribute to the tag mentioning the function to be performed when clicked
2)Then using js set it properties by defining the same function there
+ 2
https://code.sololearn.com/WsGXOrnXXDNB/?ref=app
In this code check The "Lets play" button it may give you your desired solution. On clicking it the div is changed
if you need more explanation then please do tell me
+ 2
For clear code check this
https://code.sololearn.com/WM2n85mumHbP/?ref=app
(Check onclick attribute and js)