时间的法外狂徒

导航

2020年9月17日 #

JavaScript创建一个对象的方式

摘要: 一、使用构造函数的方式 <script> //通过构造函数创建对象 function Person(name,age){ this.name = name; this.age = age; this.do = function (){ return "ok"; } } var PerConstruc 阅读全文

posted @ 2020-09-17 16:19 抄手砚 阅读(324) 评论(0) 推荐(0) 编辑