项目中需要封装一些js公共方法,第1种做法:function xx() {}function yy() {}第2种做法:var a = new A(); A.prototype.xx=function () {}; A.prototype.yy=function () {};这两种方法哪个好,各自使用场景都是啥?谢谢 查看完整描述