摘要: 表示两个参数是否相同的Boolean 。 Object.is() 判断两个值是否相同。如果下列任何一项成立,则两个值相同: 两个值都是 undefined 两个值都是 null 两个值都是 true 或者都是 false 两个值是由相同个数的字符按照相同的顺序组成的字符串 两个值指向同一个对象 两个 阅读全文
posted @ 2017-11-10 14:50 幽竹小妖 阅读(416) 评论(0) 推荐(0) 编辑
摘要: 扩展运算符 ... 1.数组的扩展运算符将一个数组转换成一个逗号分隔的参数序列 console.log(...[1,2,3]) //1,2,3 ['a', 'b',...[1,3]] //a,b,1,3 2.扩展运算用于函数调用 function push(a, arr){ a.push(...ar 阅读全文
posted @ 2017-11-09 19:23 幽竹小妖 阅读(1256) 评论(0) 推荐(0) 编辑
摘要: html: css: js: images: 利用绝对定位不写top默认和父级顶部对齐 阅读全文
posted @ 2017-11-09 16:05 幽竹小妖 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 转载自:https://segmentfault.com/a/1190000005898538?utm_source=tuicool&utm_medium=referral 转换工具 智图 isparta 判断浏览器支持webP 方法一: console.log(checkWebp()); // t 阅读全文
posted @ 2017-11-09 15:57 幽竹小妖 阅读(1757) 评论(0) 推荐(0) 编辑
摘要: 火狐浏览器: background:-moz-linear-gradient(top, red, rgba(0, 0, 255, 0.5)); 谷歌: .l6{background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FF0000), to 阅读全文
posted @ 2017-10-26 16:18 幽竹小妖 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://zhangyiheng.com/blog/articles/js_event_mitter.html 需求 随着Browser客户端JS越来越复杂,MVC(Client端)设计模式成为一个很好的开发选择, 而MVC开发模式中,最基础的功能就是把Model和View关联起来, 阅读全文
posted @ 2017-10-23 16:03 幽竹小妖 阅读(2592) 评论(0) 推荐(0) 编辑
摘要: 找了好久才找到一篇可以简单粗暴就能用的,所以拿过来算是收藏了。里面有一个css2里的命令是我没用过的也是这里面关键的:table-layout:fixed; 原理很简单,有爱研究的童鞋可以去css官网看看说明文档。 直接贴代码: 转载自:http://www.cnblogs.com/webSong/ 阅读全文
posted @ 2017-10-19 16:26 幽竹小妖 阅读(1438) 评论(0) 推荐(0) 编辑
摘要: 转自:http://www.cnblogs.com/fsjohnhuang/archive/2011/12/07/2279554.html document.domain 用来得到当前网页的域名。比如在地址栏里输入:javascript:alert(document.domain); //www.f 阅读全文
posted @ 2017-09-07 14:56 幽竹小妖 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: 链接:http://pan.baidu.com/s/1pKCl42B 密码:fyp2链接:http://pan.baidu.com/s/1kVKbvCz 密码:qci2链接:http://pan.baidu.com/s/1cq76Q6 密码:y6bn 阅读全文
posted @ 2017-08-31 17:02 幽竹小妖 阅读(177) 评论(0) 推荐(0) 编辑
摘要: //验证手机号 eg: checkTel("13812345678")function checkTel(value){ var re = /^1[3|4|5|7|8]\d{9}$/;//手机号码正则表达式 return re.test(value);} //验证座机号 eg: checkPhone 阅读全文
posted @ 2017-08-31 15:35 幽竹小妖 阅读(189) 评论(0) 推荐(0) 编辑