[Solved] How to replace comma with semi colon for inner html or text

[ad_1]

The simplest working, but ugly way:

document.querySelector('.myclass').innerHTML =  document.querySelector('.myclass').innerHTML.replace(/<\/a>,/g, '</a>;');

Nicer way, though still ugly:

var toReplace = document.querySelector('.myclass');
toReplace.innerHTML = toReplace.innerHTML.replace(/<\/a>,/g, '</a>;');

0

[ad_2]

solved How to replace comma with semi colon for inner html or text