我使用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做些什么吗?
提前感谢!