I want to replace every <li> tag with # & every </li> with <br />
I think I need a global replace function for that rather than a simple string.replace() so…
var s=obj1.innerHTML;
s = s.replace(/<li>/g,"# ");
s = s.replace(/</li>/g,"<br/>");
But it doesn’t seem to be working. Any mistake ?
EDIT: I am going to use the code in blogger & that is why it needs to be parsed.So that’s why you see " instead of ".
Do this way:-
LIVE DEMO