How can I use javascript timing to control on mouse stop and on mouse move events
问题 So I have a control (a map) on an aspx page. I want to write some javascript to onload setup the following: when mouse stops on control = some code when mouse moves = some code (but only if the move is longer than 250 mil sec) This works to trigger code on stop and then on move... function setupmousemovement() { var map1 = document.getElementById('Map_Panel'); var map = document.getElementById('Map1'); map1.onmousemove = (function() { var onmousestop = function() { //code to do on stop },