I have a text in a textarea and I read it out using the .value attribute.
(我在textarea中有一个文本,并使用.value属性将其读出。)
Now I would like to remove all linebreaks (the character that is produced when you press Enter ) from my text now using .replace with a regular expression, but how do I indicate a linebreak in a regex?
(现在,我想使用正则表达式.replace从我的文本中删除所有换行符(按Enter时产生的字符),但是如何在正则表达式中指示换行符?)
If that is not possible, is there another way?
(如果那不可能,还有另一种方法吗?)
ask by Wingblade translate from so