does any 1 know how to give a picture a tag or name and then in javascript or vbscript change it ?
scrypt3r
-4
Junior Poster
Recommended Answers
Jump to PostYou can give an html element an ID.
<img src="something.jpg" id="yourId">
Then look the object up using the ID.
var domElement = document.getElementById("yourId")
Now you have a reference to the dom element and you can interact with its properties...
domElement.src = …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.