0

单击鼠标选择一个日期范围进行缩放。双击取消日期选择在 ie 10 中不起作用,但在较少的浏览器中工作正常:

function mouseClickHandler(which) {

clickx = event.offsetX;

clicky = event.offsetY;

  switch (which) {
    case "click":
        // If we've just had a doubleclick then ignore it

        if (hadDoubleClick()) return false;

        // Otherwise set timer to act.  It may be preempted by a doubleclick.
        savEvent = which;

        d = new Date();

        savEvtTime = d.getTime();

        savTO = setTimeout("doClick(savEvent)", dcTime);

        break;

    case "dblclick":

        doDoubleClick(which);

        break;

    default:
  }
}
4

1 回答 1

0

我认为您最好对 ondblclick 和 onclick 使用不同的处理程序

于 2013-10-07T03:31:06.293 回答