【发布时间】:2014-04-10 10:49:22
【问题描述】:
我有一个使用 thymeleaf 模板的页面,并且在使用内联脚本时页面加载时出现以下错误:
org.xml.sax.SAXParseException;行号:270;列号:85;这 元素的内容必须由格式良好的字符数据或 标记。
第 270 行的代码
<script type="text/javascript" >
window.jQuery || document.write("<script src='assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
</script>
我尝试用&lt;&gt; 替换document.write 中的“”符号,该异常不再发生但脚本不再加载
【问题讨论】:
标签: javascript thymeleaf cdata