var Book = function(){ this.book = { "js": "好好学", "php": "不学了" } } var subClass = function(){ this.name = "儿子"; } subClass.prototype = new Book(); var test1 = new subClass(); var test2 = new subClass(); test1.book.js = "不学了"; console.log(test2.book.js);