JQuery removing '-' character from string

Posted by Zaps on Stack Overflow See other posts from Stack Overflow or by Zaps
Published on 2010-06-01T13:58:20Z Indexed on 2010/06/01 14:03 UTC
Read the original article Hit count: 166

Filed under:
|

Hi,

I hope this question isn't too basic.

I have a string "-123445". Is it possible to remove the '-' character from the string?

I have tried the following but to no avail:

$mylabel.text("-123456");
$mylabel.text().replace('-', '');

Any help would be greatly appreciated.

Thanks,

Zaps

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about string