Quantcast
Channel: DaniWeb Solved Topics
Viewing all articles
Browse latest Browse all 582

Change img with javascipt without id

$
0
0

Hey i'm trying to change the image without the id. We can't change html so i can't use an id.
I have this:

    <figure>
        <img src="images/start.png" alt="start">
        <figcaption>Nog geen thema gekozen</figcaption>
    </figure>

And in my script:
document.querySelector('src') = "images/mode.png";
I don't know how to select it and change it.

Viewing all articles
Browse latest Browse all 582

Latest Images

Trending Articles



Latest Images