开发者

Newline character lost in IE8 textarea

I am trying to read text from a textarea in IE8 using some JavaScript, using the prototype library selector - "$F(text-area-开发者_开发知识库id)"

The text I get out of this does not preserve the new lines present in the textarea. Is there any CSS properties I need to set for achieving this?

Thanks!


Without seeing any of your code (ahem), new lines are usually put in "automagically" by the wrapping on the text area. You can override this with white-space style.

Alternatively, you can search your string for the newline character \n which sometimes gets "lost in translation".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜