wanderingsoul
01-11-2007, 04:55 AM
Hi, I'm trying to remove the underscores in sigs and the following new line character.
function rd() {
var a=document.getElementsByTagName('p');
for(var i=0;i<a.length;i++){
if(a(i).className == "sig"){
a(i).replace(_,'');
} } }
I've been trying to get this to work for a while now but no luck. The underscores to remove are in <p class="sig">. I also tried this: a(i).replace(/_+/g,''); but I couldn't get that to work.
Thanks for looking!
edit: or do I need a while loop to look for all instances of _ and then remove the new line character after?
function rd() {
var a=document.getElementsByTagName('p');
for(var i=0;i<a.length;i++){
if(a(i).className == "sig"){
a(i).replace(_,'');
} } }
I've been trying to get this to work for a while now but no luck. The underscores to remove are in <p class="sig">. I also tried this: a(i).replace(/_+/g,''); but I couldn't get that to work.
Thanks for looking!
edit: or do I need a while loop to look for all instances of _ and then remove the new line character after?