備忘録的プログラミングリファレンス

touchend ( ontouchend )イベント

 touchend ( ontouchend )イベントは、タッチベースのデバイスにおいて指が離れると発生するイベントです。

*Safari、Operaブラウザでは対応していません。

touchend ( ontouchend )イベント
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)

BubblesYes
CancelableYes
InterfaceTouchEvent
Supported HTML ElementsALL HTML elements

Example

 touchend ( ontouchend )イベントの例です。

 タッチデバイスでの操作がキャンセルされると発生するイベントです。この例では、どのタイミングで touchcancel、touchstart、touchend、touchmove の各イベントが発生するかを確かめるためにタッチデバイスに関するイベントを網羅しています。

確認ボタンをクリックしてください。以下のHTML,CSS,Scriptコード例が実行されます。