yingleiming

告诫自己即使再累,也不要忘记学习。成功没有捷径可走,只有一步接着一步走下去!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Uncaught SyntaxError: Invalid or unexpected token:"无效或意外的标记",出现这种报错的原因,如果代码没问题,那么检查(),{},<,>,;等符号是否错误的使用了中文符号。

function Person(){
}
var dom=Person.prototype;
console.log(dom);
Person.prototype.name="Yingleiming";
Person.prototype.age=28;
Person.prototype.job="Software Engineer";//此处错误的使用了中文符号
Person.prototype.sayName=function(){
    alert(this.name);
};
console.log(dom);

 

posted on 2017-10-12 09:49  yingleiming  阅读(4227)  评论(0)    收藏  举报