2019年2月14日
摘要: 1.什么是对象? 对象:任何事物都是对象,拥有属性和方法两大特征; 属性:描述事物的特征; 方法:事物拥有的行为; 2.在js中区分构造对象属性和方法; Person.age=10 属性 Person.fn=function(){} 方法 属性=右边是基本值; 方法=右边是函数; 3.在js中如何生 阅读全文
posted @ 2019-02-14 19:39 Web引领者 阅读(143) 评论(0) 推荐(0) 编辑
摘要: var mf=11; //倒计时写法 function mm(bb,q,d){ var s=new Date(); var i=new Date("2150/12/"+mf+" 00:00:00"); var cc=i-s; var e=parseInt(cc/86400000); var h=pa 阅读全文
posted @ 2019-02-14 16:36 Web引领者 阅读(142) 评论(0) 推荐(0) 编辑
摘要: //抖动案例 <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> #div{ width:100px; height:200px; background:red; position:absolute; 阅读全文
posted @ 2019-02-14 16:34 Web引领者 阅读(161) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin:0; padding:0; } #ha{ width:500px; height:500px; border:red 1px s 阅读全文
posted @ 2019-02-14 16:27 Web引领者 阅读(101) 评论(0) 推荐(0) 编辑
摘要: //钢琴快案例 <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> #ha{ width:600px; height:200px; border:red 1px solid; margin:100px 阅读全文
posted @ 2019-02-14 16:25 Web引领者 阅读(121) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> #aa{ width:500px; height:500px; border:red 1px solid; margin:100px auto; p 阅读全文
posted @ 2019-02-14 16:19 Web引领者 阅读(96) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> </body> </html> <script> var t=null; //地图系统 function Map(){ this.w 阅读全文
posted @ 2019-02-14 16:10 Web引领者 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 3.深拷贝:如果对象中的属性值又是一个引用数据类型,浅拷贝也能实现,浅拷贝还是把引用数据类型的内存地址赋值给空的对象的一个属性,深拷贝将属性值也一个一个遍历赋值;冒充对象继承就是拷贝继承 案例: var obj={ name:"张三", arr=[12,20,36] sex:{ y:12, x:24 阅读全文
posted @ 2019-02-14 15:54 Web引领者 阅读(309) 评论(0) 推荐(0) 编辑