Hexo

Home Archives
2016-07-12

回调函数(4-1)

animation

  • [x] 回调函数 : 把一个方法A当做参数传递给另一个函数B,然后在B执行过程中,根据需求让A执行
1
2
3
4
5
6
7
8
9
10
function A(){
}
function B(fn){
fn();
fn();
fn();
}
B(A);//将A当做参数传给B的
  • 回调函数
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    ary.sort(function(a,b){
    return a-b;
    });
    str.replace(/\d+/g,function(){
    //正则匹配几次就调用该函数几次
    });
    window.setTimeout(function(){
    },10)
Share
  • animation
Newer
jQuery的ajax、事件、工具、动画(4-4)
Older

Categories

    Tags

    • Ajax
    • Array
    • DOM
    • JSON
    • JSONP
    • RegExp
    • animation
    • function
    • html+css
    • html+css mark
    • html+css 总结
    • html+css 移动端
    • item
    • item Ajax
    • item jQuery
    • item js css mark
    • jQuery
    • js DOM 事件
    • js DOM 盒子模型
    • js ECMAScript 作用域内存
    • js ECMAScript 面向对象
    • js function
    • node
    • node.js
    • 事件
    • 作用域内存
    • 总结
    • 移动端

    Tag Cloud

    Ajax Array DOM JSON JSONP RegExp animation function html+css html+css mark html+css 总结 html+css 移动端 item item Ajax item jQuery item js css mark jQuery js DOM 事件 js DOM 盒子模型 js ECMAScript 作用域内存 js ECMAScript 面向对象 js function node node.js 事件 作用域内存 总结 移动端

    Archives

    • October 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • September 2016
    • July 2016
    • June 2016

    Recent Posts

    • (no title)
    • 折叠菜单 & 选项卡jQuery(4-4)
    • call、apply、bind(2-2)
    • 惰性思想(封装单例模式、函数重新覆盖)
    • 表格排序实例(2-2)
    © 2019 John Doe
    Powered by Hexo
    Home Archives