我在$ faq ['content']中有一个文本;当我回显$ faq ['content']时,此错误显示在浏览器控制台中:
' ' string literal contains an unescaped line break Error
我的代码:
<script>
setTimeout(function () {
$(".opencxbody").html('<div style="max-height:400px; overflow-y: scroll;"> <?php echo $faq['content']; ?></div>');
}, 100);
</script>
答案 0 :(得分:0)
请重试。
<script>
setTimeout(() => {
let data = "<div style='max-height:400px; overflow-y: scroll;'>";
data += "<?=$sss?>";
data += "</div>";
$(".opencxbody").html(data);
}, 100);
</script>