Javascript replace new line with br tag (줄바꿈을 br tag로 변환)

function replaceNewLineWithBr(text) {
return text.replace(/(?:\r\n|\r|\n)/g, "<br />");
}

댓글

이 블로그의 인기 게시물

express 로 sunnyforpv.kr 웹서버 만들기