摘要: 1.禁止默认事件 document.addEventListener("touchstart",function(ev){ ev=ev||event; ev.preventDefault(); }) 需要使用默认事件的元素上用ev.stopPropagation()阻止冒泡事件. 2.禁止电话与邮箱 阅读全文
posted @ 2018-09-09 15:51 杨小coding 阅读(112) 评论(0) 推荐(0)
摘要: 本文参考自掘金 Vincent Ko https://juejin.im/post/5b72f0caf265da282809f3b5(前端鄙视&面试 算法) 阅读全文
posted @ 2018-08-20 10:07 杨小coding 阅读(4831) 评论(0) 推荐(0)
摘要: 获取对象key值与key[value值] 阅读全文
posted @ 2018-08-19 15:12 杨小coding 阅读(17286) 评论(0) 推荐(0)
摘要: Ajax步骤: 1.创建一个对象XMLHttpRequest对象. 2.设置回调onreadystatechange方法.判断成功与否( status=200 readyStates = 4). 题外话: staus各数值所代表的意思:200=成功;404:路径请求错误;503:服务不可用;read 阅读全文
posted @ 2017-09-19 17:47 杨小coding 阅读(170) 评论(0) 推荐(0)