\ n无法在IE文本区域中工作 [英] \n is not working in IE text area

查看:104
本文介绍了\ n无法在IE文本区域中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此jquery添加页面的一些元素并将它们添加到文本区域

I am using this jquery to add some elements of the page and add them to a text area

$('#chk_editor').append($('#greeting').text()).append('\n \nI want it to be known that').show();

Internet Explorer忽略/ n,我发现这个问题解决了split()$ b的问题$ b Javascript split()在IE中无效

Internet Explorer ignores the /n, I found this question that addresses the issue with split() Javascript split() not working in IE

我不确定如何将它实现到我的代码中,任何帮助表示赞赏。

I'm not sure how to implement it into my code, any help appreciated.

推荐答案

尝试使用 \\\\ n

这是Windows样式行结尾。 \ n 是UNIX样式行结尾。

This is the Windows style line ending. \n is the UNIX style line ending.

这篇关于\ n无法在IE文本区域中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆