admin管理员组文章数量:1287579
I'm developing a site which is stored locally, and works great in all browsers I've tested except for any versions of IE.
It gives me "SCRIPT1014: Invalid character" for each js-file which I've included in script-tags like this for instance: <script src="Scripts/jquery-1.9.1.min.js"></script>
This generates the following error:
SCRIPT1014: Invalid character
jquery-1.9.1.min.js, line 1 character 1
If I then click the error to view the file in ie developer tools it looks like this:
?? I?%&/m?{J?J??t??`$ؐ@??????iG#)?*??eVe]f@?흼??{???{???;?N'????\fdl??J?ɞ!????~|?"????
etc
I'd except this to be a mon problem (Or don't people ever view locally stored webpages in ie?) but I didn't find much when searching, and what I found didn't help.
How to get around this this?
I'm developing a site which is stored locally, and works great in all browsers I've tested except for any versions of IE.
It gives me "SCRIPT1014: Invalid character" for each js-file which I've included in script-tags like this for instance: <script src="Scripts/jquery-1.9.1.min.js"></script>
This generates the following error:
SCRIPT1014: Invalid character
jquery-1.9.1.min.js, line 1 character 1
If I then click the error to view the file in ie developer tools it looks like this:
?? I?%&/m?{J?J??t??`$ؐ@??????iG#)?*??eVe]f@?흼??{???{???;?N'????\fdl??J?ɞ!????~|?"????
etc
I'd except this to be a mon problem (Or don't people ever view locally stored webpages in ie?) but I didn't find much when searching, and what I found didn't help.
How to get around this this?
- 1 I would try to re-download the file and replace the original and see if it helps. – epascarello Commented Feb 12, 2013 at 14:00
-
What does the
jquery-1.9.1.min.js
file look like if you view it in, say, Notepad? – Lee Taylor Commented Feb 12, 2013 at 14:03 - I would guess it's a character encoding issue. – SDC Commented Feb 12, 2013 at 14:05
- It looks correctly. And this happens with each and every js file I use, ones I've created myself and ones I've downloaded. And I forgot saying that it works if I change to src to "code.jquery./jquery-latest.min.js" or such – Clox Commented Feb 12, 2013 at 14:06
- I'd guess it's a character encoding isse too. I did try adding charset="utf-8" to the script-tag but it didn't fix the issue – Clox Commented Feb 12, 2013 at 14:09
1 Answer
Reset to default 6There is a similar problem here: SCRIPT1014: Invalid character
I would check the browser security settings for local scripts.
You can try adding this to your page and see if it works:
<!-- saved from url=(0016)http://localhost -->
or you can set the 'local intranet' zone to low and disable protected mode if on.
http://msdn.microsoft./en-us/library/ms537628(v=vs.85).aspx
Edit: Answer in ments - cleared browser cache.
本文标签: javascriptGetting SCRIPT1014 Invalid character in IE from local js fileStack Overflow
版权声明:本文标题:javascript - Getting SCRIPT1014: Invalid character in IE from local js file - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741308834a2371531.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论