So I\'m new with JavaScript (this is actually my first attempt to make something work) and I\'m having a bit of trouble. I thought I had enough knowledge to make this work,
I know this question is old, but for the one's what are new, here is what you can do:
HTML
Click Me!
JAVASCRIPT
function myFunction() { document.getElementById('demo').src = "myImage.png"; }