JS 继承实例分析

时间:2008-11-04    点击:188   
复制代码 代码如下:

function P(name){
this.name=name;

this.p1=function(){
alert('Parent Constructor');
}
return this;
}
function C(name,id){
//this.method=P;
//this.method(name); //1st method
//P.call(this,name); //2nd method
P.apply(this,new Array(name));//3rd method
this.id=id;
this.dis=function(){
alert(this.name);
}
}
function dis(){
alert(this.name);
}
function t(){
var cc=new C('N','Id');
cc.dis();
cc.p1();
}
用js统计用户下载网页所需时间的脚本
解决extjs在firefox中关闭窗口再打开后iframe中js函数访问不到的问题
ext读取两种结构的xml的代码
仿163填写邮件地址自动显示下拉(无优化)
js form action动态修改方法
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved