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>'));