js构造函数的继承
2015-11-11 11:39
459 查看
function extend(Child, Parent) {
var F = function(){};
F.prototype = Parent.prototype;
Child.prototype = new F();
Child.prototype.constructor = Child;
Child.uber = Parent.prototype;
}
var F = function(){};
F.prototype = Parent.prototype;
Child.prototype = new F();
Child.prototype.constructor = Child;
Child.uber = Parent.prototype;
}
相关文章推荐
- echart,highcharts,chart.js等chart属性记录
- JS---类的继承
- [Ext JS 4] Extjs 之 initComponent 和 constructor的区别
- html 中javascript 页面加载完成后执行函数
- JSON toJSONString
- JavaScript匿名函数的使用
- Extjs 远程排序
- 九种原生js动画效果
- Extjs 控件属性大全
- jstl 学习
- js文字横向滚动特效
- iOS中JavaScript和OC交互
- console.log使用
- javascript 常见问题
- js/uploadifive html图片批量上传插件
- frames的对象兼容性获取以及跨域实现数据交换(js文件的加载判断)
- js正则表达式语法
- js控制按键在规定时间内的可操作性
- 详解javascript遍历方式
- js常用正则表达式