星空网 > 软件开发 > Java

javascript axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

先看看下面的代码,图片是用notepad++写的,上面下面两段代码一摸一样,但是下面就是报错

javascript  axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

javascript  axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

开始感觉是不是变量名的问题,结果发现不是

javascript  axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

 

 

对于这种奇葩的问题,我只能贴出代码,无可奈何!!!

<html><head><title>javascript</title>  <script type="text/javascript">      function f1(){      var n = 999;      alert(n);    }    f1();      </script>    <script type="text/javascript">      function f2(){      var m = 999;      alert(m);     }    f2();      </script></head></html>

如果有高人在的话,能解释一下吗?

结果发现,在 notepad++ 里面的显示有一点点不同:

javascript  axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

最后果断的选择报错的行前面的空格,删了,再打三个tab键:

javascript  axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

 

出现了,神一般的虚线:

javascript  axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

问题居然出在代码前面的空白字符,这段代码本来是用 UltraEdit 编辑器编辑的,额,如果你什么时候出了和我一样的问题,这或许可以解救你!

错误代码贴一下:

axError: Unexpected token ILLEGAL

element

Font
font-family
font-size
font-style
font-variant
font-weight
letter-spacing
line-height
text-decoration
text-align
text-indent
text-transform
white-space
word-spacing
color
Background
bg-attachment
bg-color
bg-image
bg-position
bg-repeat
Box
width
height
border-top
border-right
border-bottom
border-left
margin
padding
max-height
min-height
max-width
min-width
outline-color
outline-style
outline-width
Positioning
position
top
bottom
right
left
float
display
clear
z-index
List
list-style-image
list-style-type
list-style-position
Table
vertical-align
border-collapse
border-spacing
caption-side
empty-cells
table-layout
Effects
text-shadow
-webkit-box-shadow
border-radius
Other
overflow
cursor
visibility




原标题:javascript axError: Unexpected token ILLEGAL 很简单的代码,但是无法解释的错误

关键词:JavaScript

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

网红营销最怕遇到什么坑?:https://www.ikjzd.com/articles/93770
EPS流氓律师所又发新案!Wish店铺直接被封!:https://www.ikjzd.com/articles/93780
央视快评:中国经济的底气从何而来?:https://www.ikjzd.com/articles/93781
321电商早报0515丨亚马逊引入自动打包机器人:https://www.ikjzd.com/articles/93782
美豆价暴跌急哭美农, 特朗普紧急抛出"150亿美元回购"空头支票!:https://www.ikjzd.com/articles/93783
SHOPYY自建站平台系统升级新功能解析:https://www.ikjzd.com/articles/93785
无锡旅游景点竹海 - 无锡的竹海:https://www.vstour.cn/a/363178.html
5月贾汪好玩的地方 贾汪哪有好玩的地方:https://www.vstour.cn/a/363179.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流