使用
' \n '
换行,而不是'\n'
注意前后空格
实战demo:
$('#text').val('hello' + ' \n ' + 'world');
tanpenggood 博主文章分类:JavaScript ©著作权
使用
' \n '
换行,而不是'\n'
注意前后空格
实战demo:
$('#text').val('hello' + ' \n ' + 'world');
EBPF 技术使用的小尝试
CPU狂飙900%,该怎么处理?
替换换行符:str = str.replace(/[\r\n]/g, '') ;
java代码中需要用换行符将很多字符串分割开来,但是windows和linux的换行符又不一样,这个时候应该怎么做呢?可以直接用下面这个方法拿到对应系统的换行符System.getProperty("line.separator")
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M