XML DOM timeStamp 事件属性
定義と使用方法
timeStamp 事件属性は、イベントが発生した日時(epochからのミリ秒数)を示すタイムスタンプを返します。
epoch はイベント参照ポイントです。ここでは、クライアントが起動した時間です。
すべてのシステムがこの情報を提供していないため、timeStamp 属性はすべてのシステム/イベントに対して利用可能ではありません。
文法
event.timeStamp
例
以下の例では、システムが起動してから始まるイベントタグを取得します:
<html> <head> <script type="text/javascript"> function showTimestamp(event) { var minutes = 1000*60 x=event.timeStamp; alert(x/minutes) } </script> </head> <body onmousedown="showTimestamp(event)"> <p>Document in the click. An alert box will alert the timestamp.</p> </body> </html>
TIY
- timestamp event
- システムが起動してから現在までの分を返します(IE ブラウザはサポートしていません)。