上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 1、hasOwnProperty():判断属性是不是自身属性,是返回true=>对象.hasOwnProperty(属性) in:自身和原型都返回true =>属性 in 对象 因此通过以上属性,就可以判断是存在对象中?还是原型中? 一些对比,如下: 2、propertyIsEnumerable() 阅读全文
posted @ 2016-04-01 16:27 joya 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-03-03 17:55 joya 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 可参考的gulp资源 入门:https://segmentfault.com/a/1190000000435599   比较详细:https://markpop.github.io/2014/09/17/Gulp%E5%85%A5%E9%97%A8%E6%95%99%E7%A8%8B/     ba 阅读全文
posted @ 2016-03-02 15:45 joya 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 首先要书写核心js代码,控制住页面的初始大小:我是以750px(即iPhone6)的标准,设置font-size:100px;<script> (function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'orientati 阅读全文
posted @ 2016-02-24 13:39 joya 阅读(573) 评论(0) 推荐(0) 编辑
摘要: body *{ -webkit-filter: grayscale(100%); /* webkit */ -moz-filter: grayscale(100%); /*firefox*/ -ms-filter: grayscale(100%); /*ie9*/ -o-filter: graysc 阅读全文
posted @ 2016-02-18 22:13 joya 阅读(157) 评论(0) 推荐(0) 编辑
摘要: $('input').change(function(){ var fileObj = this.files[0]; //检查是否支持FileReader对象 if (typeof FileReader!= 'undefined'){ var acceptTypes = /\.(jpe?g|png) 阅读全文
posted @ 2016-02-04 22:24 joya 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1、forEach arr:参数是key,index json:与jquery相反,参数是value,key2、str-->json JSON.parse() angular.fromJson() json-->str JSON.stringify() angular.toJson() 后面跟一个t 阅读全文
posted @ 2016-02-03 15:07 joya 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 1.chrome远程调试chrome://inspect安卓手机打开“设置”--“关于手机”--“内部版本号”(点击7次)--可以打开开发者选项“设置”--“开发者选项”--“usb调试打勾”刷新"chrome://inspect",手机允许授权。inspect是调试,focus tab是tab... 阅读全文
posted @ 2015-12-14 21:49 joya 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1、draggable ="true" 元素可以拖拽了2、拖拽元素事件: dragstart 拖拽前触发 drag 拖拽前、拖拽结束之间,连续触发 dragend拖拽结束触发3、目标元素事件: dragenter 进入目标元素触发 dragover 在目标元素移动触发 dragle... 阅读全文
posted @ 2015-04-27 22:39 joya 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 1、setTimeout setTimeout(function(){ }),1000) setTimeout(function(num){ alert(num) //弹123 },1000,123)2、拼接字符串(使用\) document.body.innerHTML = 'd... 阅读全文
posted @ 2015-03-09 22:20 joya 阅读(208) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页