摘要: 在类中创建一个方法 方式一:在类内写方法 function Product(pno,pname,price){ //属性 this.pno=pno; this.pname=pname; this.price=price; //方法 this.getPrice=function(){ return t 阅读全文
posted @ 2023-01-30 17:08 灰色小五 阅读(126) 评论(0) 推荐(0)