[Javascript] return \n

liorean liorean at gmail.com
Tue Dec 19 11:41:12 CST 2006


On 19/12/06, Diego Chagastelles <dchagastelles at gmail.com> wrote:
> I want to get the value of a textarea element. I get the value when the user
> press Enter (Return Key). The problem is that when I do this, the textarea
> value comes with "\n" in the end. I know its there, how can I strip this
> out?

string.replace(/\n$/,'');
-- 
David "liorean" Andersson



More information about the Javascript mailing list