摘要: 事件捕获->事件阶段->冒泡阶段一般默认是在冒泡阶段触发 pp.addEventListener('click', function (e) { alert('父节点') }, false);false 冒泡阶段 pp.addEventListener('click', function (e) { 阅读全文
posted @ 2018-08-03 09:55 天马行空的Max 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 在用构造函数 new 出来一个对象时的思考,以及逐步解决理清思路的过程。https://blog.csdn.net/zhouziyu2011/article/details/60143385 new 的分步详情https://blog.csdn.net/qq_28978893/article/det 阅读全文
posted @ 2018-06-26 14:06 天马行空的Max 阅读(119) 评论(0) 推荐(0) 编辑
摘要: function a(){ this.sex=[1,2,3] } function b(){ a.call(this) this.say=function(){ console.log(b.say) } } b.prototype=new a(); var c=new b(); var d=new b(); c.sex.push(4) consol... 阅读全文
posted @ 2018-06-26 10:19 天马行空的Max 阅读(70) 评论(0) 推荐(0) 编辑
摘要: function a(){ this.sex=[1,2,3]}a.prototype={ age:[1,2,3], say:function(){ }}var b=new a();b.age.push(4)console.log(a.prototype)console.log(b.age)var c 阅读全文
posted @ 2018-06-25 09:16 天马行空的Max 阅读(70) 评论(0) 推荐(0) 编辑
摘要: < > ' " 添加的时候进行转义。http://zccst.iteye.com/blog/2157743 阅读全文
posted @ 2018-06-20 20:24 天马行空的Max 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 使用者只需要在js中调用方法并传入一个ID即可生成验证工具 $("#IP").ipInput().Init(); 阅读全文
posted @ 2018-06-12 18:21 天马行空的Max 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 自己写的一个校验IP、IP掩码、IP段的方法JS 阅读全文
posted @ 2018-06-05 09:23 天马行空的Max 阅读(1530) 评论(0) 推荐(0) 编辑
摘要: Array.splice()splice() 方法与 slice() 方法的作用是不同的,splice() 方法会直接对数组进行修改。var arr=[1,2,3,4]arr.splice(0,1)=[1] arr=[2,3,4] 删除arr.slice(0,1)=[2,3,4] arr=[1,2, 阅读全文
posted @ 2018-06-02 19:47 天马行空的Max 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 昨天为了满足项目需求,挖掘了时间控件的一些技巧。需满足的功能:1如果用户不选择时间,显示一个默认时间 2时间选择器打开,显示的是上个月和这个月的日期 3不能选择new Date()之后的时间 4传给后台时间数据为 2018-05-25格式 <el-date-picker v-model="value 阅读全文
posted @ 2018-05-26 11:46 天马行空的Max 阅读(6476) 评论(0) 推荐(1) 编辑
摘要: 本文是从匿名函数、立即调用函数、作用域、作用域链、闭包的创建和销毁讨论关于闭包,想弄懂闭包这些都是我们想思考的。对于闭包,我们应该先思考,为什么我们需要闭包。举一个非常常见的例子: <li>0</li> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li> 阅读全文
posted @ 2018-05-23 22:34 天马行空的Max 阅读(120) 评论(0) 推荐(0) 编辑