javascript HTML1506:意外标记 <script>
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32567148/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTML1506: Unexpected token <script>
提问by Destination Designs
I have aweird thing going on that only appears in Internet Explorer and Edge where I am getting HTML1506: Unexpected token in line 213,1. My suspicions are that it has to do with the way my webcomponents/polyfills are loading, but at this point there its a pretty complicated web of components and scripts so narrowing down the source is a pain!
我有一些奇怪的事情发生,它只出现在 Internet Explorer 和 Edge 中,在那里我得到了 HTML1506:第 213,1 行中的意外令牌。我怀疑这与我的 webcomponents/polyfills 的加载方式有关,但在这一点上,它是一个非常复杂的组件和脚本网络,因此缩小源范围很痛苦!
here is the code segment containing line 213
这是包含第 213 行的代码段
210 </body>
211 </html>
212
213 <script>
214 /********************************
215 /TEMPLATE VARS
216 /*******************************/
217 var save_url = '';
218 var base_url = 'http://disalle.dev.activemls.com/';
live site: http://disalle.dev.activemls.com
回答by TbWill4321
At first glance, it looks like you have you scripts after your closing HTML document.
乍一看,您似乎在关闭 HTML 文档后拥有脚本。
Try:
尝试:
</body>
<script>
/********************************
/TEMPLATE VARS
/*******************************/
var save_url = '';
var base_url = 'http://disalle.dev.activemls.com/';
// More Stuff Here
</script>
</html>