Dynamic IMG (tag) using javascript


/ Published in: JavaScript
Save to your folder(s)

If you need to have an tag be dynamic (in this case, I wanted to reference my weather station graphs from Weather Underground and ensure I had "today's" graph without updating the HTML by hand), then this is the way to do it. I made it more verbose just for illustration. You can reduce the code-size dramatically if that's important to you.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.