alter img element using vbscript?

  • Thread starter Thread starter teejayem
  • Start date Start date
T

teejayem

I have an image <img src"contract.gif" alt"Contract" />

Is there anyway I can change the image using VBScript?
 
I haven't used VBScript in years; you can use JavaScript like this:



First give the element an ID.

<img id="MyImage" src="contract.gif" alt="Contract" />



Then:

document.getElementById("MyImage").src = "../images/new.gif";



Regards,

Brian K. Williams
 
Back
Top