touchend ( ontouchend )イベント
touchend ( ontouchend )イベントは、タッチベースのデバイスにおいて指が離れると発生するイベントです。
*Safari、Operaブラウザでは対応していません。
document.getElementById("contena").addEventListener("touchend", (event)=>{
console.log( event );
});
詳しくは Example を参照してください
ページ内 Index
構文(Syntax)
in HTML
<tagelement ontouchend="function()">
in JavaScript
object.ontouchend = function(){ }; object.addEventListener("touchend", script_);
備考(Remarks)
Bubbles | Yes |
Cancelable | Yes |
Interface | TouchEvent |
Supported HTML Elements | ALL HTML elements |
Example
touchend ( ontouchend )イベントの例です。
タッチデバイスでの操作がキャンセルされると発生するイベントです。この例では、どのタイミングで touchcancel、touchstart、touchend、touchmove の各イベントが発生するかを確かめるためにタッチデバイスに関するイベントを網羅しています。
タッチデバイスに関連するイベント
タッチイベントには下記のイベントがあります。
touchstart | タッチデバイスでエレメントに触れる |
touchend | エレメントから指が離れる |
touchmove | 画面上で指を動かす |
touchcancel | タッチイベントが中断する |