Replace element with class from javascript string : I have javascript string 

    var str = <div><p class="">Deleted content <span class="del cts-2">example</span></p></div>

I want to replace <span class="del cts-2"> with <h4>.

How can I do with pure javascript?