Let's say I wanted to change all <img>
tags to <iframe>
tags on a page. Could javascript be used for this purpose?
Is there any way to change the actual tag type, or would I have to first delete the <img>
and then create the <iframe>
, if so, how can I make sure that the new tag has the same container as the old tag, etc?
What's the most straightforward and browser friendly way to perform such a substitution?