+ 1
How to add multiple images using onclick function
8 odpowiedzi
+ 3
Read this: https://www.w3schools.com/jsref/prop_style_visibility.asp
It will tell you how you can make an html element (ie. Img) visible/invisible.
+ 3
html:
<div id="imgContainer">
</div>
<button onclick="addImg()">press me</button>
js:
function addImg(){
document.getElementById("imgContainer").innerHTML += "..."; //... should be the html for all the pictures
}
+ 2
Please describe your problem better so we can understand your issue better.
+ 1
Anton Böhler 's answer should work as well depending on what exactly you are trying to do.
+ 1
Example of this type in solo learn Frenchtoast
0
Create a button ,after pressing the button so many pictures display
0
Any example in solo learn according to my question