e.target.value.replace(/\n/g,'<br/>') //用/g正则表达式就能解决 将\n替换为<br/> 如果是字符串的话就可以直接替换 转载于:https://www.cnblogs.com/lvlvlv/p/11607642.html