【发布时间】:2013-04-29 10:13:37
【问题描述】:
找不到我的问题的解决方案,所以我会在这里问。
当我插入 jQuery 文件时,我在第 2 行得到一个错误: 意外令牌非法
代码:
jQuery(document).ready(function(){
$('body').append('
<div id="style_selector">
<div id="style_selector_container">
// another chunk of code
</div><!-- #style_selector end -->');
});
提前谢谢你
【问题讨论】:
-
JavaScript 不支持这样的多行字符串。要么放在一行上,要么用
\转义结尾。
标签: javascript jquery html append