JS 去除字符串的换行符 何不笑 · 2013-07-03 16:26 · Web前端 · Markdown var str = $('#textarea').val(); str = str .replace(/\\n/g,'');