06 2016 档案

摘要:看了ES6就感觉各种数据结构的遍历方法好多好混乱,就写下来总结下,看看应用场景上有什么区别 Array: ES5: (1)Array.prototype.forEach(function(item,index,array){...}) (2)Array.prototype.map(function( 阅读全文
posted @ 2016-06-28 21:09 鳗鱼饭团 阅读(3458) 评论(0) 推荐(2)
摘要:backbone的router和history对象就是对window.history对象的操作。 学习backbone的router和history之前必须要学习window.history对象。html5给开发者添加了操作history的api。 这里需要了解两个概念: hash:个人理解,has 阅读全文
posted @ 2016-06-19 09:58 鳗鱼饭团 阅读(710) 评论(0) 推荐(0)
摘要:先列一下已经看过的书吧。 Javascript dom 高级编程 Javascript语言精粹 高性能javascript Javascript设计模式(这本书没看完,后来主要是看黑客教程小组的js视频学习的设计模式) Backbone.js实战 已经看完这些书了。再说说今后的打算吧。 1.正在学习 阅读全文
posted @ 2016-06-18 15:39 鳗鱼饭团 阅读(471) 评论(1) 推荐(0)
摘要:collection就是model的集合,这里提供各种操作集合的方法。可以参照api。 fetch方法成功后,有两个回调函数可供使用,reset和set。 阅读全文
posted @ 2016-06-18 11:19 鳗鱼饭团 阅读(351) 评论(0) 推荐(0)
摘要:1 // Backbone.View 2 // ------------- 3 4 // Backbone Views are almost more convention than they are actual code. A View 5 // is simply a JavaScript object that represents a logical ... 阅读全文
posted @ 2016-06-18 11:17 鳗鱼饭团 阅读(257) 评论(0) 推荐(0)
摘要:1 // Backbone.Model 2 // -------------- 3 4 // Backbone **Models** are the basic data object in the framework -- 5 // frequently representing a row in a table in a database on your ... 阅读全文
posted @ 2016-06-18 10:37 鳗鱼饭团 阅读(266) 评论(0) 推荐(0)
摘要:1.prototype和__proto__ 所有对象的__proto__都指向其构造器的prototype,即constructor的原型 2.变量作用域的问题 通常认为在当前作用域中找不到变量值时会到其父作用域中去寻找,这种说法是不准确的,应该是会到创建这个函数的作用域中去找 3.settimeo 阅读全文
posted @ 2016-06-14 21:19 鳗鱼饭团 阅读(177) 评论(0) 推荐(0)
摘要:总是把这两个库中的extend搞混了所以写下来。 backbone中的extend实现了继承: 1 // Helper function to correctly set up the prototype chain for subclasses. 2 // Similar to `goog.inh 阅读全文
posted @ 2016-06-05 09:50 鳗鱼饭团 阅读(193) 评论(0) 推荐(0)
摘要:第一次写,写的不对的请指正 backbone.js中的Event实现了自定义事件。自定义事件就是一个对象的键值对,key为事件名,value为一个function数组。在backbone这个对象中有一个内置的对象_events保存着所有的事件 所有Events的方法都是通过eventsApi调用的。 阅读全文
posted @ 2016-06-05 09:26 鳗鱼饭团 阅读(230) 评论(0) 推荐(0)
摘要:1.void运算符 ECMAScript 262规范,关于void说明如下: The void Operator The production UnaryExpression : void UnaryExpression is evaluated as follows: Let expr be th 阅读全文
posted @ 2016-06-04 19:56 鳗鱼饭团 阅读(211) 评论(0) 推荐(0)