[Javascript] removing line feed carriage return

Håkan Magnusson hakan at backbase.com
Tue Mar 2 06:42:25 CST 2004


Change 'str' to the name of your variable.

str.replace('\n', '', 'g');

Regards,
H

Paul McGuire wrote:

> Can anyone help me I have a string that has linebreaks in it I need all
> Char(13) and Char(10) to be removed so I can print it all on one line in a
> text area.
> 
> How do I remove replace or filter these characters in Javascript?
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 



More information about the Javascript mailing list