Hi, so I wanted to make an image change when clicked, seemed simple enough, but when I run the page and click the image- nothing happens. Worse still, I think I understand what's going on, which means I clearly don't if it isn't working!
Here is my HTML:
<!-- References the external stylesheet -->
<link rel="stylesheet" type="text/css" href="design.css">
<title>SECTION - WELCOME</title>
<img src="./images/button_unpressed.jpg" alt="FORBIDDEN WEBSITE" id="displayed" onclick="imageChange(./images/button_pressed.jpg)"/>
Thank you to anyone who helps
document.getElementById("displayed").src = sourceVar;