How to replace DOM element in place using Javascript?

I am looking to replace an element in the DOM.
For example, there is an <a> element that I want to replace with a <span> instead.

How would I go and do that?

10 Answers
10

Leave a Comment