📜  SayHello - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:40.243000             🧑  作者: Mango

代码示例2
function throttle( fn, time ) {
    var t = 0;
    return function() {
        var args = arguments, ctx = this;
        clearTimeout(t);

        t = setTimeout( function() {
            fn.apply( ctx, args );
        }, time );
    };
}