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);

 

相关文章:

  • 2021-04-04
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2021-03-30
  • 2021-10-18
  • 2021-09-02
  • 2021-04-19
猜你喜欢
  • 2021-07-23
  • 2022-01-18
  • 2022-12-23
  • 2021-04-18
  • 2021-07-28
  • 2021-06-27
相关资源
相似解决方案