摘要:
前言:我认为prototype是用来扩展对象的属性和方法的,至少目前用到的是这样的。1、扩展对象属性var user=function (){ this.name="PJL"; this.age="21"; this.gender="male";}user.prototype.id=20;user.prototype.district='CN';2、扩展对象的方法user.prototype.sayHello=function(){ alert("hello!Ladies and gentlemen..... 阅读全文
posted @ 2012-05-30 23:03
boonya
阅读(220)
评论(0)
推荐(0)

浙公网安备 33010602011771号