给对象增减方法
function Rect(w, h) {
this.width = w;
this.height = h;
}
var r = new Rect(2, 3);
/* 给 r 对象增加一个计算面积的方法 area() */
r.area = function() {return this.width * this.height};
alert(r.width); //2
alert(r.height); //3
alert(r.area()); //6
delete r.area; //删除刚刚增加的方法
alert(r.area); //undefined
function Rect(w, h) {
this.widt