JS 面向对象编程 程序集
来源:互联网 发布:deepinms优化xp程序 编辑:程序博客网 时间:2024/09/21 09:02
//
var People=function(name,address){
this.t_name=name;
var v_name=name;
this.address=address;
this.who=function(){
alert('a:'+this.t_name);//a:zengle
alert('b:'+v_name);//b:zengle
}
var where=function(){
alert(this.address);
}
}
var people=new People('zengle','福州');
people.who();
alert('c:'+people.t_name);//c:zengle
alert('d:'+people.v_name);//d:undefined
people.where();//错误: 对象不支持此属性或方法(people.where is not a function)
- JS 面向对象编程 程序集
- js 面向对象编程
- js 面向对象编程
- js 面向对象编程
- JS面向对象编程
- js面向对象编程
- Js面向对象编程
- JS面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- js面向对象编程
- JS面向对象编程
- 2009-3-4
- 我是如何挑选毕业生的
- 2009信息安全五大威胁 网络威胁集成化
- 绝对精典的SQL语句
- C#的6种常用集合类大比拼
- JS 面向对象编程 程序集
- 毕业!
- FreeBSD启动问题,禁用sendmail
- P2PSim 安装 针对高版本gcc 解决办法
- Ajax入门 第3部分 使用XML向服务器发送请求和从服务器接收 XML
- 现代教育论
- web.config文件详解
- SQL数据库的安全性控制-权力授予,撤消,拒绝
- XML和HTML常用转义字符