jquery - Remove '|' special character from a string -
my question may find simple, not getting right. how remove "|" string far have used following not working
<div class="inner"> | abcd || </div> var txt=divvar.html();
1) txt=txt.remove("|");
2)txt=txt.replace (/|/g, '');
you have escape '|' character:
txt=txt.replace (/\|/g, '');
Comments
Post a Comment