标签:arguments mouse set console call on() nts window UNC
function throat(callback,num){ var timer = null; callback = callback || function(){}; return function(){ if(!timer){ var that = this; var arg = arguments; timer = setTimeout(function(){ callback.apply(that,arg); timer = null; },num); } } } var throats = throat(function(e){ console.log(e.screenX,e.screenY); },1000); window.onmousemove = function(e){ throats(e); };
标签:arguments mouse set console call on() nts window UNC
原文地址:https://www.cnblogs.com/muamaker/p/9246681.html