博客园 - 金_玲
uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=25946
2017-12-21T06:38:24Z
金_玲
https://www.cnblogs.com/jinling/
feed.cnblogs.com
https://www.cnblogs.com/jinling/p/8080482.html
js判断isNumber(obj) - 金_玲
看到一个是不是数字的判断方法不错,所以记录下来 function isNumber(obj) { return typeof obj 'number' && !isNaN(obj) } 这个isNumber不错了,但还有一个等价的,用isFinite来判断 function isNumber(obj
2017-12-21T06:38:00Z
2017-12-21T06:38:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】看到一个是不是数字的判断方法不错,所以记录下来 function isNumber(obj) { return typeof obj 'number' && !isNaN(obj) } 这个isNumber不错了,但还有一个等价的,用isFinite来判断 function isNumber(obj <a href="https://www.cnblogs.com/jinling/p/8080482.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/8047911.html
hook - 金_玲
正在准备中、、、、
2017-12-16T14:23:00Z
2017-12-16T14:23:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】正在准备中、、、、 <a href="https://www.cnblogs.com/jinling/p/8047911.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/8047839.html
javascript中this的四种用法 - 金_玲
在javascript当中每一个function都是一个对象,所以在这个里var temp=this 指的是function当前的对象。 this是Javascript语言的一个关键字。它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用。 this只能在函数内部使用。 this 在函数执行
2017-12-16T14:00:00Z
2017-12-16T14:00:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】在javascript当中每一个function都是一个对象,所以在这个里var temp=this 指的是function当前的对象。 this是Javascript语言的一个关键字。它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用。 this只能在函数内部使用。 this 在函数执行 <a href="https://www.cnblogs.com/jinling/p/8047839.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/8032657.html
JavaScript中闭包函数 - 金_玲
闭包函数: 闭包是以 匿名函数的形式来实现。 a. 匿名函数:没有实际名字的函数。 console.log(typeof function(){});// "function" console.log(typeof function(x,y){return x+y;});// "function"
2017-12-13T06:23:00Z
2017-12-13T06:23:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】闭包函数: 闭包是以 匿名函数的形式来实现。 a. 匿名函数:没有实际名字的函数。 console.log(typeof function(){});// "function" console.log(typeof function(x,y){return x+y;});// "function" <a href="https://www.cnblogs.com/jinling/p/8032657.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/8023928.html
JavaScript(ES3)中的方法, 及bind apply call的使用 - 金_玲
转:https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/0014345005399057070809cfaa347dfb7207900cfd116fb000 转:https://www
2017-12-11T08:57:00Z
2017-12-11T08:57:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】转:https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/0014345005399057070809cfaa347dfb7207900cfd116fb000 转:https://www <a href="https://www.cnblogs.com/jinling/p/8023928.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/7999212.html
ES6 箭头函数 - 金_玲
箭头函数的语法:标识符 => 表达式 param 是参数,根据参数个数不同,分这几种情况: () => { … } // 零个参数用 () 表示; x => { … } // 一个参数可以省略 (); (x, y) => { … } // 多参数不能省略 (); 使用了块语句的函数不会有返回值,要用
2017-12-07T07:17:00Z
2017-12-07T07:17:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】箭头函数的语法:标识符 => 表达式 param 是参数,根据参数个数不同,分这几种情况: () => { … } // 零个参数用 () 表示; x => { … } // 一个参数可以省略 (); (x, y) => { … } // 多参数不能省略 (); 使用了块语句的函数不会有返回值,要用 <a href="https://www.cnblogs.com/jinling/p/7999212.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/7942199.html
原生JS forEach()和map()遍历的区别以及兼容写法 - 金_玲
转:https://www.cnblogs.com/liuruyi/p/6483526.html 一、原生JS forEach()和map()遍历 共同点: 1.都是循环遍历数组中的每一项。 2.forEach() 和 map() 里面每一次执行匿名函数都支持3个参数:数组中的当前项item,当前项
2017-12-01T06:38:00Z
2017-12-01T06:38:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】转:https://www.cnblogs.com/liuruyi/p/6483526.html 一、原生JS forEach()和map()遍历 共同点: 1.都是循环遍历数组中的每一项。 2.forEach() 和 map() 里面每一次执行匿名函数都支持3个参数:数组中的当前项item,当前项 <a href="https://www.cnblogs.com/jinling/p/7942199.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/7941873.html
移动h5自适应布局 - 金_玲
http://www.cnblogs.com/samwu/p/4285748.html(转) 问题一,分辨率Resolution适配:不同屏幕宽度,html元素宽高比和字体大小,元素之间的距离自适应,使用rem单位。 问题二,单位英寸像素数PPI适配:使用rem单位,文字会发虚。段落文字,使用px单
2017-12-01T05:46:00Z
2017-12-01T05:46:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】http://www.cnblogs.com/samwu/p/4285748.html(转) 问题一,分辨率Resolution适配:不同屏幕宽度,html元素宽高比和字体大小,元素之间的距离自适应,使用rem单位。 问题二,单位英寸像素数PPI适配:使用rem单位,文字会发虚。段落文字,使用px单 <a href="https://www.cnblogs.com/jinling/p/7941873.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6249086.html
em rem px 区分 - 金_玲
转:http://www.cnblogs.com/leejersey/p/3662612.html 国内的设计师大都喜欢用px,而国外的网站大都喜欢用em和rem,那么三者有什么区别,又各自有什么优劣呢? PX特点 1. IE无法调整那些使用px作为单位的字体大小; 2. 国外的大部分网站能够调整的
2017-12-01T02:44:00Z
2017-12-01T02:44:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】转:http://www.cnblogs.com/leejersey/p/3662612.html 国内的设计师大都喜欢用px,而国外的网站大都喜欢用em和rem,那么三者有什么区别,又各自有什么优劣呢? PX特点 1. IE无法调整那些使用px作为单位的字体大小; 2. 国外的大部分网站能够调整的 <a href="https://www.cnblogs.com/jinling/p/6249086.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6207611.html
创建js对象的属性和方法 - 金_玲
按照如下的创建对象的方法,可以节省内存。记录一下方便日后使用 <!Doctype html><html> <head> <title></title> </head> <body> <script> var Person = function(name,age){ this.name = name;
2016-12-21T06:32:00Z
2016-12-21T06:32:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】按照如下的创建对象的方法,可以节省内存。记录一下方便日后使用 <!Doctype html><html> <head> <title></title> </head> <body> <script> var Person = function(name,age){ this.name = name; <a href="https://www.cnblogs.com/jinling/p/6207611.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6169008.html
JavaScript中reduce()方法 - 金_玲
https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/001435119854495d29b9b3d7028477a96ed74db95032675000 重新学习reduce,这个是比
2016-12-13T02:53:00Z
2016-12-13T02:53:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/001435119854495d29b9b3d7028477a96ed74db95032675000 重新学习reduce,这个是比 <a href="https://www.cnblogs.com/jinling/p/6169008.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6168722.html
canvas 动态画线 - 金_玲
<!--实现鼠标按下的时候,移动进行绘制,鼠标抬起结束绘图,用到的事件有mousedown mousemove mouseup用的的canvas api 有 beginPath moveTo lineTo stroke涉及到了内容有dom标签canvas 事件和canvas的api--><!DOCT
2016-12-13T02:02:00Z
2016-12-13T02:02:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】<!--实现鼠标按下的时候,移动进行绘制,鼠标抬起结束绘图,用到的事件有mousedown mousemove mouseup用的的canvas api 有 beginPath moveTo lineTo stroke涉及到了内容有dom标签canvas 事件和canvas的api--><!DOCT <a href="https://www.cnblogs.com/jinling/p/6168722.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6165277.html
nwjs 配置文件package.json 转载 - 金_玲
配置文件package.json nw在启动应用程序时,首先要读取package.json文件,初始化基本属性,下面我们看看package.json的完整参数。每个参数配置都标有注释。 [plain] view plain copy { /**指定程序的起始页面。*/ "main": "index.
2016-12-12T09:21:00Z
2016-12-12T09:21:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】配置文件package.json nw在启动应用程序时,首先要读取package.json文件,初始化基本属性,下面我们看看package.json的完整参数。每个参数配置都标有注释。 [plain] view plain copy { /**指定程序的起始页面。*/ "main": "index. <a href="https://www.cnblogs.com/jinling/p/6165277.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6163198.html
闭包函数自执行的原理 - 金_玲
这个是很久以前写的,也不知道是在书上找到的还是那里来的。 闭包函数自执行的格式 (function(){})(); (1). 首先, 要清楚两者的区别: (function {// code})是表达式, function {// code}是函数声明. (2). 其次, js"预编译"的特点: j
2016-12-12T01:02:00Z
2016-12-12T01:02:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】这个是很久以前写的,也不知道是在书上找到的还是那里来的。 闭包函数自执行的格式 (function(){})(); (1). 首先, 要清楚两者的区别: (function {// code})是表达式, function {// code}是函数声明. (2). 其次, js"预编译"的特点: j <a href="https://www.cnblogs.com/jinling/p/6163198.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6163190.html
js中遍历对象的属性和值 - 金_玲
今天想看一下js的数组遍历的内容,搜索到了一个关于对象遍历写好的函数,保留一下。以后好用。 function allPrpos ( obj ) { // 用来保存所有的属性名称和值 var props = "" ; // 开始遍历 for ( var p in obj ){ // 方法 if ( t
2016-12-12T01:00:00Z
2016-12-12T01:00:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】今天想看一下js的数组遍历的内容,搜索到了一个关于对象遍历写好的函数,保留一下。以后好用。 function allPrpos ( obj ) { // 用来保存所有的属性名称和值 var props = "" ; // 开始遍历 for ( var p in obj ){ // 方法 if ( t <a href="https://www.cnblogs.com/jinling/p/6163190.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6086227.html
canvas 画字 - 金_玲
用canvas画字还是头一回,要想和UI设计的画的一模一样还是真有些苦难,不过现在实现的效果已经很像了。 <!--通过字体文件引入字体--><style>@font-face { font-family: TitilliumWeb-BoldItalic; src: url(TitilliumWeb-
2016-11-21T09:27:00Z
2016-11-21T09:27:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】用canvas画字还是头一回,要想和UI设计的画的一模一样还是真有些苦难,不过现在实现的效果已经很像了。 <!--通过字体文件引入字体--><style>@font-face { font-family: TitilliumWeb-BoldItalic; src: url(TitilliumWeb- <a href="https://www.cnblogs.com/jinling/p/6086227.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/6068918.html
nwjs解决页面透明化,启动时显示白屏的问题 - 金_玲
这些天在弄nwjs还好能访问外网,可以看到官方的文档,要不然真是欲哭无泪了,找不到相关的文档解决不了问题。主要说说怎么页面透明化的时候,出现白屏一闪问题吧。主要工具: AngularJS+node+nw.js 来开发和传输数据显示的方式 官方文档: 在html页面实现: <body style="b
2016-11-16T03:44:00Z
2016-11-16T03:44:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】这些天在弄nwjs还好能访问外网,可以看到官方的文档,要不然真是欲哭无泪了,找不到相关的文档解决不了问题。主要说说怎么页面透明化的时候,出现白屏一闪问题吧。主要工具: AngularJS+node+nw.js 来开发和传输数据显示的方式 官方文档: 在html页面实现: <body style="b <a href="https://www.cnblogs.com/jinling/p/6068918.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/5464609.html
windows 下 webstorm 使用SVN - 金_玲
1、安装了webstorm之后,用了很久都没有配置SVN 现在想配置svn,结果发现一般的svn程序不好用。 经指导,发现需要安装一个专用于webstorm的SVN 2、在file->settings->Version Contorl->subversion->with conmand line c
2016-05-06T02:15:00Z
2016-05-06T02:15:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】1、安装了webstorm之后,用了很久都没有配置SVN 现在想配置svn,结果发现一般的svn程序不好用。 经指导,发现需要安装一个专用于webstorm的SVN 2、在file->settings->Version Contorl->subversion->with conmand line c <a href="https://www.cnblogs.com/jinling/p/5464609.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/5462338.html
JavaScript 中 for (var i in data) 循环数组项 - 金_玲
今天在改代码的时候发现有很多代码的循环是用 for(var i in data)写的,我通常都是用for(var i=0;i<data.length;i++) 就查看了一下,原来这两个是有区别的,不能等同使用。 <script>Array.prototype.test = function () {
2016-05-05T08:18:00Z
2016-05-05T08:18:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】今天在改代码的时候发现有很多代码的循环是用 for(var i in data)写的,我通常都是用for(var i=0;i<data.length;i++) 就查看了一下,原来这两个是有区别的,不能等同使用。 <script>Array.prototype.test = function () { <a href="https://www.cnblogs.com/jinling/p/5462338.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/jinling/p/5340846.html
转 通过js获取cookie的实例及简单分析 - 金_玲
今天review新人写的javascript代码的时候发现了很多的问题。这里以function getCookie(name){}为例。 今天review新人写的javascript代码的时候发现了很多的问题。这里以function getCookie(name){}为例。 其中比较典型的一个问题就
2016-03-31T05:20:00Z
2016-03-31T05:20:00Z
金_玲
https://www.cnblogs.com/jinling/
【摘要】今天review新人写的javascript代码的时候发现了很多的问题。这里以function getCookie(name){}为例。 今天review新人写的javascript代码的时候发现了很多的问题。这里以function getCookie(name){}为例。 其中比较典型的一个问题就 <a href="https://www.cnblogs.com/jinling/p/5340846.html" target="_blank">阅读全文</a>