![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
greengnn
这个作者很懒,什么都没留下…
展开
-
JS OO程式学习笔记
/** * @ fileoverview Javascript OO JS面向对象*//** * @overview function 形式 赋值需要用this*/function a(){ //属性 this.name=null; //方法 this.setName=function(name){ this.name=name;原创 2009-06-11 17:13:00 · 3249 阅读 · 4 评论 -
JS OO 学习笔记 ——JS封装使用prototype添加方法
function Person() { this.id = null; this.showId = function() { alert("My id is " + id); } Person.prototype.getId = function() { return id;原创 2009-06-23 13:25:00 · 1801 阅读 · 1 评论