JavaScript
luqingxuan
这个作者很懒,什么都没留下…
展开
-
0.1 + 0.2 = 0.3
https://www.cnblogs.com/fsjohnhuang/p/5115672.html原创 2018-07-13 10:25:25 · 202 阅读 · 0 评论 -
call & apply
学习mark http://uule.iteye.com/blog/1158829 https://segmentfault.com/q/1010000003494514 call是传入单个参数的,而apply是传入参数数组的,在call传入参数数量大于3个的时候,性能不如apply,因此在有些类库的代码中,会出现这种优化方式...原创 2017-10-13 08:02:27 · 48 阅读 · 0 评论 -
router: onpopstate
学习mark history.pushState(stateObject, title, url);tip: stateObject = {key: value, ...},必须可序列化,理解为JSON.stringify & JSON.parse 接收url的参数为string类型,用以改变当前地址栏的url.需要注意的一点就是这个参数不能和跨域,即协议,域名...原创 2017-10-13 08:01:44 · 181 阅读 · 0 评论 -
router: onhashchange
学习mark http://www.cnblogs.com/carriezhao/p/6861319.html http://smiky.iteye.com/blog/1917700 http://www.cnblogs.com/rubylouvre/archive/2012/10/24/2730599.html原创 2017-10-13 07:55:53 · 119 阅读 · 0 评论 -
history: reload & replace
学习mark 有3个页面(a.html, b.html, c.html).默认打开a.html页面,然后在a.html页面中通过一个链接转向b.html页面。现在,我在b.html页面中用window.location.replace("c.html");与用window.location.href("c.html");分别进入c.html页面.从用户界面来看是没有什么区别的,但是现在...原创 2017-10-12 08:12:22 · 209 阅读 · 0 评论 -
router:iframe历史记录
学习mark http://www.cnblogs.com/ranran/p/iframe_history.html http://front-end.blog.163.com/blog/static/119581242201042502813887/原创 2017-10-12 08:12:02 · 231 阅读 · 0 评论 -
js解析过程
学习mark http://www.html5jscss.com/js-data-scope.html http://www.cnblogs.com/foodoir/p/5977950.html http://www.360doc.com/content/13/0412/11/7492958_277750522.shtml原创 2017-10-12 08:11:45 · 65 阅读 · 0 评论 -
浏览器允许的并发请求资源数
学习mark 解决方案是启用和主站不同的域名来放置静态资源,也就是cookie free 浏览器是基于domain的并发控制,而不是page https://www.zhihu.com/question/20474326 http://www.cnblogs.com/x_wukong/p/3926059.html?utm_source=tuicool&u...原创 2017-10-12 08:11:31 · 202 阅读 · 0 评论 -
尽量少用iframe
学习mark http://www.williamlong.info/archives/3136.html原创 2017-10-12 08:11:10 · 112 阅读 · 0 评论 -
void 0 & undefined
学习mark http://web.jobbole.com/86145/原创 2017-10-10 08:11:43 · 63 阅读 · 0 评论 -
function bind
学习mark http://www.jianshu.com/p/6958f99db769原创 2017-10-10 08:11:10 · 57 阅读 · 0 评论 -
slice & splice
学习mark 数组copy:var a = [1, 2, 3];var b = a.slice(); // b = [1, 2, 3] arguments -> array:Array.prototype.slice.call(arguments); // arguments -> [] http://blog.csdn.net/zpw91/ar...原创 2017-10-10 08:05:23 · 58 阅读 · 0 评论 -
prototype
学习mark https://www.zhihu.com/question/34183746?sort=created http://www.cnblogs.com/faith3/p/6210273.html 每一个函数在创建之后都会拥有一个名为prototype的属性,这个属性指向函数的原型对象。Note:通过Function.protot...原创 2017-10-10 08:04:50 · 56 阅读 · 0 评论 -
instanceof原理
学习mark instanceof 检测一个对象A是不是另一个对象B的实例的原理是:查看对象B的prototype指向的对象是否在对象A的[[prototype]]链上。如果在,则返回true,如果不在则返回false。不过有一个特殊的情况,当对象B的prototype为null将会报错(类似于空指针异常)。 https://www.ibm.com/developerworks...原创 2017-10-09 08:51:07 · 84 阅读 · 0 评论 -
cookie/session/token
学习mark http://blog.csdn.net/gg_gogoing/article/details/47446441 http://www.jianshu.com/p/1d286c4cc1d0 https://zhuanlan.zhihu.com/p/25495290原创 2017-09-28 09:14:51 · 61 阅读 · 0 评论 -
localStorage/sessionStorage
学习mark http://caibaojian.com/localstorage-sessionstorage.html原创 2017-09-28 09:09:08 · 57 阅读 · 0 评论 -
(!(~+[])+{})[--[~+""][+[]]*[~+[]] + ~~!+[]]+({}+[])[[~!+[]]*~+[]]
学习mark 关键学习Object -> Number解析过程 http://www.jfh.com/jfperiodical/article/3224 https://sdk.cn/news/3025原创 2017-10-16 11:40:38 · 989 阅读 · 0 评论 -
mutation event & mutation observe
mutation observer: http://www.jianshu.com/p/b5c9e4c7b1e1原创 2017-11-20 11:03:02 · 275 阅读 · 0 评论 -
postMessage & Message Channel
postMessage跨文档通讯Channel Message跨通道通讯 http://lzw.me/a/html5-postmessage-post-cross-domain.html https://developer.mozilla.org/en-US/docs/Web/API/Channel_Messaging_API/Using_channel_messaging...原创 2017-11-20 11:42:51 · 691 阅读 · 0 评论 -
稀疏数组&密集数组
需要注意Array很多方法在遍历时跳过了稀疏数组元素,比如filter、map https://blog.csdn.net/aitangyong/article/details/40191305/ https://blog.csdn.net/wangji5850/article/details/51135948...原创 2018-07-13 10:02:54 · 270 阅读 · 0 评论 -
AST acron
http://www.php.cn/js-tutorial-339468.html原创 2018-07-12 09:19:01 · 197 阅读 · 0 评论 -
storageChange
值得特别注意的是,storage事件不在导致数据变化的当前页面触发。如果浏览器同时打开一个域名下面的多个页面,当其中一个页面改变sessionStorage或localStorage的数据时,其他所有页面的storage事件会被触发,而原始页面并不触发storage事件。可以通过这种机制,实现多个窗口之间的通信。所有浏览器之中,只有IE浏览器除外,它会在所有页面触发storage事...原创 2018-06-28 17:31:12 · 649 阅读 · 0 评论 -
页面关闭发送数据 sendBeacon
navigator.sendBeacon http://www.yunnanhaoli.com/web/javascript/510.html原创 2018-06-27 16:24:22 · 849 阅读 · 0 评论 -
Event 接口
event.eventPhase event.path || event.composedPath() || polyfill http://javascript.ruanyifeng.com/dom/event.html原创 2018-06-27 10:20:17 · 315 阅读 · 0 评论 -
currentScript
如何获取当前js文档的地址 https://blog.csdn.net/cuixiping/article/details/45917149原创 2018-06-11 13:13:35 · 108 阅读 · 0 评论 -
前端工程化
https://github.com/hoperyy/blog/issues/114原创 2018-06-04 09:02:03 · 102 阅读 · 0 评论 -
ArrayBuffer
https://www.cnblogs.com/copperhaze/p/6149041.html https://blog.csdn.net/jack__cj/article/details/53026278原创 2018-05-22 09:12:11 · 230 阅读 · 0 评论 -
JS Bridge
https://github.com/lzyzsd/JsBridge https://github.com/marcuswestin/WebViewJavascriptBridge https://www.cnblogs.com/iOS-eflying/p/7143552.html https://blog.csdn.net/carson_ho/article/d...原创 2018-05-21 13:59:43 · 102 阅读 · 0 评论 -
DOMContentLoad
https://blog.csdn.net/fgdfgasd/article/details/51484707原创 2018-04-28 11:23:55 · 265 阅读 · 0 评论 -
冒泡VS捕获 顺序
https://www.cnblogs.com/alvinwei1024/p/4739344.html 首先捕获从document -> target然后冒泡从target -> document 同一个元素element上注册冒泡与捕获监听,谁先注册,谁先执行...原创 2018-03-21 09:31:11 · 169 阅读 · 0 评论 -
前端学习网站
基础性的学习网站:w3school:http://www.w3school.com.cn/w3cplus:www.w3cplus.comMDN网站 :https://developer.mozilla.org/zh-CN/docs/Web菜鸟教程网:http://www.runoob.com易百教程:http://www.yiibai.com/脚本之家:http://...原创 2018-01-29 10:32:36 · 84 阅读 · 0 评论 -
data-set
1.dataset 比 attribute操作耗时2.dataset JS操作使用驼峰命名3.dataset JS操作设值只能是String4.jQuery.data对data数据做出的更改,不会反映到HTML元素data属性上 https://www.cnblogs.com/summa/p/4561474.html http://www.webhek.com...原创 2017-12-21 09:02:58 · 1333 阅读 · 0 评论 -
关于鼠标滑过走势的预判算法
https://github.com/wayou/sliphover/ https://github.com/webmandesign/jquery.hoverdir/blob/master/jquery.hoverdir.js http://www.cnblogs.com/lyzg/p/5689761.html https://segmentfault.com/...原创 2017-12-06 15:44:41 · 382 阅读 · 0 评论 -
浮点数计算
https://fed.renren.com/2017/05/13/float-number/ https://zhuanlan.zhihu.com/p/31202697原创 2017-11-21 08:21:28 · 106 阅读 · 0 评论 -
requirejs/seajs
学习mark "RequireJS 是没有明显的 bug,SeaJS 是明显没有 bug 关键词:依赖前置,按需执行require依赖加载&执行,amd规范seajs依赖加载,按需执行,延迟了执行,cmd规范通过function.toString扫描实现依赖js文件的识别 https://www.douban.com/note/283566440/...原创 2017-09-26 18:06:15 · 89 阅读 · 0 评论 -
amd/cmd/umd
学习mark https://github.com/seajs/seajs/issues/242 http://web.jobbole.com/82238/ http://www.jianshu.com/p/bd4585b737d7原创 2017-09-26 18:00:11 · 90 阅读 · 0 评论 -
JS变量对象delete
转载:http://www.nowamagic.net/librarys/veda/detail/1673关于变量,有一个重要的知识点。变量相对于简单属性来说,变量有一个特性(attribute):{DontDelete},这个特性的含义就是不能用delete操作符直接删除变量属性。1a = 10;2alert(window.a); // 10...原创 2014-09-24 11:13:14 · 68 阅读 · 0 评论 -
函数表达式
按照标准,表达式语句不能以一个大括号{开始是因为他很难与代码块区分,同样,他也不能以函数关键字开始,因为很难与函数声明进行区分,故而一下方式错误:1.{}.constructor;2.function(){}();分组()处理:1.({}).constructor;2.(function(){})();或修改成赋值表达式:1.var x={}...原创 2014-09-23 10:53:38 · 60 阅读 · 0 评论 -
JavaScript的大括号的语义
转载:http://www.nowamagic.net/librarys/veda/detail/1016Javascript中大括号"{}"有四种语义作用:语义1. 组织复合语句,这是最常见的:1if( condition ) {2 //...3}else {4 //......原创 2014-09-23 10:06:36 · 124 阅读 · 0 评论 -
几个字面量转换
var myVar = "3.14159", str = ""+ myVar,// to string int = ~~myVar, // to integer float = 1*myVar, // to float boo...原创 2014-09-23 09:15:18 · 75 阅读 · 0 评论