我在使用 javascript 更新 div 时遇到问题。
<script>
document.getElementById('advertisingBrandValues').innerHTML = "<p>The Mac is the most powerful creative tool in the world, giving users unbridled potential to make everything from bespoke family albums to industry-standard pop songs – iCreate is the key to unlocking that potential. Accessible, smart and authoritative, the iCreate brand thrives on the mantra ‘instruct, inform, inspire’, helping thousands of Mac users realise their creative ambitions.</p>";
</script>
<div id="advertisingBrandValues"></div>
我不断收到以下错误:
未终止的字符串文字 ,它表明错误与第一个 P 标记有关
我需要对传递给 innerHTML 函数的 HTML 做一些事情吗?
提前致谢!