Posted By

Tagged

Who likes this?

Dynamic IMG (tag) using javascript

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.