会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Kite Fly
one by one step.
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
8
下一页
2017年3月6日
闭包理解
摘要: 什么是闭包(文献):函数对象通过作用域链相互关联,函数体变量可以保存在函数作用域内(保护函数内的局部变量,不受全局变量影响)
阅读全文
posted @ 2017-03-06 12:43 CodeProducter
阅读(110)
评论(0)
推荐(0)
2017年2月28日
jQuery中extend()实现原理
摘要: jQuery.extend使用的几种方式 1.jQuery.extend(源对象) 1 jQuery源代码: 2 3 if(length == i){ 4 target = this; 5 --i; 6 } 7 8 示例1: 9 10 var person = { 11 sex : 'male',
阅读全文
posted @ 2017-02-28 19:21 CodeProducter
阅读(1516)
评论(0)
推荐(0)
2017年2月15日
jQuery中$的三种关系
摘要: 要搞清楚$('div','li') 和 $('div , li') 和 $('div li') 区别 $('div','li')是$(子,父),是从父节点里找子,而不是找li外面的div $('div , li')才是找所有的div和li,之间不存在父子关系 $('div li') 是找div里面所
阅读全文
posted @ 2017-02-15 12:28 CodeProducter
阅读(329)
评论(0)
推荐(0)
2016年12月28日
由于php环境时间与北京时间相差7个小时
摘要: 故在设置当前时间时候需要加上 date_default_timezone_set('prc'); 或者 在php.ini里面设置date.timezone=prc
阅读全文
posted @ 2016-12-28 11:34 CodeProducter
阅读(981)
评论(0)
推荐(0)
2016年11月14日
原生键盘遮住页面部分内容
摘要: 处理方法:
阅读全文
posted @ 2016-11-14 16:16 CodeProducter
阅读(228)
评论(0)
推荐(0)
2016年11月4日
让块级元素水平垂直居中
摘要: function fun(){ var wWidth = null, wHeight = null; if(window.innerHeight && window.innerWidth){ wHeight = window.innerHeight; wWidth = window.innerWid
阅读全文
posted @ 2016-11-04 18:18 CodeProducter
阅读(266)
评论(0)
推荐(0)
2016年10月31日
关于字符串过滤
摘要: 1 String a = "1,2,3,4"; 2 3 String[] arr = a.split(","); 4 5 取arr中所有字符在预定义字符中进行过滤 6 7 8 9 例如:在里面过滤字符串为"1"的数据 10 11 for(int k=0;k<arr.length;k++){ 12 13 if("1".equals(a...
阅读全文
posted @ 2016-10-31 14:57 CodeProducter
阅读(828)
评论(0)
推荐(0)
2016年10月12日
scrollIntoView()方法
摘要: 该方法用于建立一个锚点,点击锚点,会跳到相应的内容,且该内容头部与浏览器头部平齐 实例:
阅读全文
posted @ 2016-10-12 19:45 CodeProducter
阅读(8627)
评论(0)
推荐(1)
2016年10月11日
DOM树中节点与节点之间的关系图
摘要: 获取子代元素节点:children 获取所有子代元素节点数:**.childElementCount 或者 **.children.length
阅读全文
posted @ 2016-10-11 10:47 CodeProducter
阅读(741)
评论(0)
推荐(0)
2016年10月10日
临时调用call()与apply()方法
摘要: 当在某个局域范围内要调用构造函数中或者其他局域范围内的方法 此时可以用到临时调用方法call与apply var a = {"0":"a","1":"b",length:2}; 1.利用字符串连接 var b = Array.prototype.join.call(a,"+"); //临时调用数组a
阅读全文
posted @ 2016-10-10 16:39 CodeProducter
阅读(195)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页