javascript 对象 工厂方式和构造函数
1.一个简单的代码
function s(names){this.name=names;this.showname=functoin(){ alert(this.name);}} //工厂方式
new s("张三").showname(); // 函数中 'this' 的理解
2. 面向对象的定义、特点、 对象原型prototype
3.JS是基于原型的程序:可以改写系统的属性或方法
1.一个简单的代码
function s(names){this.name=names;this.showname=functoin(){ alert(this.name);}} //工厂方式
new s("张三").showname(); // 函数中 'this' 的理解
2. 面向对象的定义、特点、 对象原型prototype
3.JS是基于原型的程序:可以改写系统的属性或方法