반응형

jquery 자동 줄바꿈처리 replace


var yinfo =data ;



yinfo = yinfo.replace(/(?:\r\n|\r|\n)/g, "<br />");



$("#test").append(yinfo);


$("#test").text(yinfo);


하시면 됩니다.

반응형

+ Recent posts