Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リクエストをdivに送信するときにjqueryに問題があります。
だから私はこのような変数を持っています:-
$text = "hi ";
したがって、phpのこの変数は、次のように呼び出しました:-
nl2br($text);
複数行で表示するには、php のようにテキストを表示するために同じ関数が必要です。
$(selector).html(text.replace(/\n/g, '<br>'));