この不愉快な長い行のテキストを段落に変換する方法はありますか?JQuery .text()複数行
前:
$('.ContText-1').text('For a business to thrive, it needs a team of people who are dedicated to its success. Paul Lister, Bryan Jeter, and Bryan Lloyd are committed to being a part of that team for each of their clients.');
後:(
後の単一引用符にUncaught SyntaxError: Invalid or unexpected token
その参照:私は段落のいずれかを実行した場合
$('.ContText-1').text('
For a business to thrive, it needs a team of people who are dedicated to its
success. Paul Lister, Bryan Jeter, and Bryan Lloyd are committed to being a part of
that team for each of their clients.
');
私はこのエラーを取得します。
代わりtext()
方法の使用の
でエスケープしないので、それはうまくいきません。 –