function a(){
this.say=function(){
alert("happy new year!");
}
}
function b(){
a.apply(this,arguments);
}
a.prototype.fuck=function(){
alert("%^&%^&%&^%&");
}
var oB=new b();
alert(oB instanceof a);// false
oB.say(); // happy new year
oB.fuck(); // 读不到
function a(){
this.say=function(){
alert("happy new year!");
}
}
function b(){}
a.prototype.fuck=function(){
alert("%^&%^&%&^%&");
}
a.prototype.z=123;
b.prototype=new a();
var oB=new b();
alert(oB instanceof a); // true
alert(oB.z); // 123
oB.say(); // happy new year
oB.fuck(); // %^&%^&%&^%&
function a(){
var oA=new Array();
oA.say=function(){
alert("hello A!");
}
return oA;
}
var obj=new a();
alert(obj instanceof a); // false
obj.say();
function a(){
this.num=123;
this.say=function(){
alert("happy new year!");
}
}
function b(){
this.extends=function(obj){
for(each in obj){
this[each]=obj[each];
}
}
}
var oB=new b();
oB.extends(new a());
alert(oB instanceof a); // false
alert(oB.num); // 123
oB.say(); // happy new year
function a(){
this.num=123;
this.say=function(){
alert("happy new year!");
}
}
function b(){
a.apply(this);
}
b.prototype=new a();
b.prototype.z=123;
var oB=new b();
alert(oB instanceof a); // true
alert(oB.num); // 123
oB.say(); // happy new year
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有