首页 > 应用开发 > > javascript原型链?
function fun_1(){
= "jiao";
}
function fun_2(){
this.age = 99;
}
fun_2.prototype = new fun_1();
var obj = new fun_1();
alert(obj.age);
请问代码中fun_1继承了fun_2还是fun_2继承了fun_1?如何判断?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1414/viewspace-3131004/ ,如需转载,请注明出处,否则将追究法律责任。