var index = function(){};
index.prototype = { btnActive: function (){@#¥%……&*#¥%……},
roleHover: function (){@#¥%……&*#¥%……}
}
index.prototype.constructor = index;var index = new index();
index.btnActive();
index.roleHover();請問一下定義一個函數之后 再去定義函數的prototype 是有什么作用?然后最后幾句也還沒看懂什么意思 求高手解答一下
js prototype 定義作用
大話西游666
2018-10-11 13:14:30