摘要: 在<head>内引入外部Js ,报错出异常,显示Uncaught TypeError: Cannot read property 'appendChild' of undefined,属性未定义。为什么出现这种问题。查找很久发现这跟Js、DOM加载顺序有关,由于写在了<head>内,它会先执行,但是 阅读全文
posted @ 2021-03-10 09:13 小白可别不举铁 阅读(9282) 评论(0) 推荐(1) 编辑
摘要: 原型语法 function Student(name,id){ this.name = name; this.id = id; } //获取对象的prototype Student.prototype.type = "student"; Student.prototype.message = fun 阅读全文
posted @ 2021-03-10 07:09 小白可别不举铁 阅读(92) 评论(0) 推荐(0) 编辑