摘要:
var BaseCalculator = function() { this.decimalDigits = 2;};BaseCalculator.prototype = { add: function(x, y) { return x + y; }, subtract: function(x, y) { return x - y; }};var Calculator = function () { //为每个实例都声明一个税收数字 this.tax = 5;}; Calculator.prototype = ... 阅读全文