<textarea cols='60' rows='8'>This is my statement one.\n This is my statement2</textarea>
<textarea cols='60' rows='8'>This is my statement one.<br/> This is my statement2</textarea>
Run Code Online (Sandbox Code Playgroud)
我尝试了两个,但在渲染html文件时新行没有反映出来.我怎样才能做到这一点?
System.getProperty("line.separator");在JavaScript中是否存在类似于Java的东西?
编辑:我使用的是非浏览器JavaScript环境Node.js