function Apple(name,color,weight){ this.name=name; this.color=color; this.weight=weight; } Apple.prototype.printMsg=function(){ document.getElementById("divId").innerHTML= this.name+" "+this.color+" "+this.weight; } var myApple=new Apple('smallApple','red',300);
New Web Project Page
apple message
阅读(1136) | 评论(0) | 转发(0) |