0

HTML img

How can I make an image and some text... change when I press a button on the web page?

4th Oct 2019, 12:25 PM
Hagl Official
Hagl Official - avatar
5 odpowiedzi
+ 1
When that button is clicked, do you want to change the image (use another image) or do you want to change the text? is the text part of the image or is it contained in some element (separated from image)?
4th Oct 2019, 1:19 PM
Ipang
0
Both... change the image and the text
4th Oct 2019, 1:24 PM
Hagl Official
Hagl Official - avatar
0
Rune Official Please attach your code link in the original question (above) so everyone can see clearly, and know what to suggest. I would guess you'd have to use JavaScript to accomplish the task, but until the code is here to see, I'm not sure what to suggest : )
4th Oct 2019, 2:29 PM
Ipang
0
Well i dont have it... it is just a project that has not been started But... i think i have to use JavaScript for that...
4th Oct 2019, 2:30 PM
Hagl Official
Hagl Official - avatar
0
You still haven't confirmed me about my second question, are the image and text being two different element, or is the text a part of the image (like a watermark). Changing text in the image itself is definitely harder than changing image and text distinctly.
4th Oct 2019, 2:34 PM
Ipang