摘要: 类、对象类:模子对象:产品(成品) 蛋糕(对象) 模子(类) Array 类 arr 对象 Array.push(); 错 arr.push(); 对 new arr(); 错 原型prototype 是加到类上面,而不是对象。 混合方式构造对象:方法都是相同的,属性都是不同的。方法 => 函数属性 阅读全文
posted @ 2018-12-29 20:08 CarpenterZoe 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 选项卡3 选项卡2 阅读全文
posted @ 2018-12-29 20:06 CarpenterZoe 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-12-29 20:04 CarpenterZoe 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 疑问: 1. getElementsByTagName 和 getElementsByClassName 的区别? 分别在什么应用场景? 错误1: 错误2: 阅读全文
posted @ 2018-12-29 16:18 CarpenterZoe 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 自定义右键菜单,错误记录 阅读全文
posted @ 2018-12-28 17:45 CarpenterZoe 阅读(236) 评论(0) 推荐(0) 编辑
摘要: window.onload = function () { var oDiv = document.getElementById('div1'); var oBtn = document.getElementById('btn1'); //oBtn.onclick = function () { ... 阅读全文
posted @ 2018-12-28 16:40 CarpenterZoe 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 本次练习错误总结: 1. div跟着用户操作而移动,首先必须要绝对定位,否则无法移动。 2. if条件语句里面是双等号,不是单等号(赋值)。 3. 坐标值没有Right,只能offsetLeft 加减。 阅读全文
posted @ 2018-12-28 16:04 CarpenterZoe 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 疑点: 为什么这里的onkeydown = function有变量 (ev),前面onclick函数没有? 阅读全文
posted @ 2018-12-26 20:00 CarpenterZoe 阅读(537) 评论(0) 推荐(0) 编辑
摘要: function getPosition(ev) { var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; var scrollLeft = document.documentElement.scrollLeft || document.body.scrol... 阅读全文
posted @ 2018-12-26 17:25 CarpenterZoe 阅读(2356) 评论(0) 推荐(0) 编辑
摘要: 该练习的笔记如下: 1. var cur=0; //先声明一个变量。 2. parseInt会舍掉小数,而opacity值恰恰是小数,所以对于opacity,必须用parseFloat。 3. a. '+ var +' 字符串中引入变量的格式。 b. 透明度兼容性问题,需要2种分别赋值。 4. Ma 阅读全文
posted @ 2018-12-26 14:45 CarpenterZoe 阅读(265) 评论(0) 推荐(0) 编辑