<script type="text/javascript">
// 方法3 原型继承
var Obj3 = new Function();
Obj3.prototype = {
v1: "",
get_v1: function() {
return this.v1;
},
set_v1: function(v) {
this.v1 = v;
}
};
var obj3 = new Obj();
obj3.set_v1('hello3');
alert(obj3.get_v1());
</script>
狐的传说
相关分类