我正在使用script
标记从其他网站接收降价格式的文字。它适用于在线文本,但如果它带有换行符,我会收到控制台错误。
Uncaught SyntaxError: Unexpected token ILLEGAL
我从服务器获取的文本示例:
var body = "<p>Introductions</p>
<p>Hi! I'm Professor Franklin Risby. Pleased to make your acquaintance. We'll be spending some time together, as I'm supposed to teach you...</p>
<p>I won't assume any previous functional programming knowledge....</p>";
$('script#s_parent').after("<div class='pagemash_parent'></div>");
$('._parent').html(body);