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

浙公网安备 33010602011771号