0

mousemove イベントのコールバック関数の「イベント」パラメータから取得できる開始時間に関連付けられた属性はありますか?

4

2 に答える 2

1

Have you tried event.timeStamp?

Returns the time (in milliseconds since the epoch) at which the event was created.

于 2012-04-04T03:21:22.163 に答える
0

このコードはtimestamp、要素内でmousemoveが最初に発生したときの時間を(として)格納します。

 var startTime = null;
    $('<YOUR_ELEMENT>').one('mousemove', function(e) {
        startTime = e.timeStamp;
        console.log(startTime);
    });
于 2012-04-04T03:34:27.207 に答える