2017年1月24日
摘要: 跨域可以使用谷歌的插件解决:https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi 或者谷歌开启允许跨域,参考 http://camnpr.com/arc 阅读全文
posted @ 2017-01-24 21:58 正正果实 阅读(121) 评论(0) 推荐(0) 编辑
  2017年1月4日
摘要: HTML CSS 阅读全文
posted @ 2017-01-04 10:29 正正果实 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1.constructor 在W3C定义中的定义:constructor 属性返回对创建此对象的数组函数的引用 就是返回对象相对应的构造函数。从定义上来说跟instanceof不太一致,但效果都是一样的 如: (a instanceof Array) //a是否Array的实例?true or fa 阅读全文
posted @ 2017-01-04 10:11 正正果实 阅读(189) 评论(0) 推荐(0) 编辑
  2016年12月27日
摘要: SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass 阅读全文
posted @ 2016-12-27 17:17 正正果实 阅读(645) 评论(0) 推荐(0) 编辑
  2016年12月22日
摘要: if(navigator.userAgent.toLowerCase().toString().indexOf('qqbrowser') > -1){ console.log('qq');}else{ console.log('other');} 阅读全文
posted @ 2016-12-22 22:08 正正果实 阅读(1102) 评论(0) 推荐(1) 编辑
  2016年11月21日
摘要: 手机号:var reg = /^1[34578]\d{9}$/; 手机号和座机:var reg=/^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/; if (!reg.test(Telphone)) { $dialog.module.init({ content: '手机号格式不正确', ... 阅读全文
posted @ 2016-11-21 23:01 正正果实 阅读(205) 评论(0) 推荐(0) 编辑
  2016年8月3日
摘要: npm config set registry https://registry.npm.taobao.org --globalnpm config set disturl https://npm.taobao.org/dist --global 阅读全文
posted @ 2016-08-03 22:35 正正果实 阅读(173) 评论(0) 推荐(0) 编辑
  2016年7月20日
摘要: 1. 使用最新版本的jQuery jQuery的版本更新很快,你应该总是使用最新的版本。因为新版本会改进性能,还有很多新功能。 下面就来看看,不同版本的jQuery性能差异有多大。这里是三条最常见的jQuery选择语句: $('.elem') $('.elem', context) context. 阅读全文
posted @ 2016-07-20 12:44 正正果实 阅读(1157) 评论(0) 推荐(0) 编辑
  2016年3月9日
摘要: 1.判断浏览器类型 if navigator.userAgent.indexOf(”MSIE”)>0) {} //判断是否IE浏览器 if(isFirefox=navigator.userAgent.indexOf(”Firefox”)>0){ }判断是否火狐浏览器 if(isSafari=navi 阅读全文
posted @ 2016-03-09 18:16 正正果实 阅读(532) 评论(0) 推荐(0) 编辑
摘要: $(" body").click(function(){ $("#div").hide(); }); $("button").click(function(e){ $("div").show(); e.stopPropagation();//阻止冒泡到body }); $("#div").click 阅读全文
posted @ 2016-03-09 16:41 正正果实 阅读(299) 评论(0) 推荐(0) 编辑