代码改变世界

review的一个收获popstate,addEventListener:false ,split,jquery cache

2017-02-22 17:02  改吧  阅读(296)  评论(0编辑  收藏  举报
一、popstate:记录url历史变化
二、document.location.hash:锚点后面的东西
三、addEventListener:false 是否在捕获或者冒泡事件中执行
强转换
四、split(‘#’):用指定的字符把字符串分割成数组:
var a=‘hello#world’;
               a.split(‘#’)==>[‘hello’,’world']
               var a=‘hello#world##!'
               a.split(‘#’)==>[‘hello’,’world’,’’,’!']
五、extend:{},http://www.cnblogs.com/lwwen/p/6210398.html
六、ease-out:以低速结束
ease-in:以低速开始
ease-in-out:以低速开始和结束
 
七、jquery cache参数:
cache:1.true:默认值
               2.false:dataType=’script’,’jsonp’时的默认值
network里面的status:304,从缓存里面拿数据
cache:1.true:
          2.false:在url后面会加一个时间戳,让他跑到数据库里面拿数据