이 번역은 완료되지 않았습니다. 이 문서를 번역해 주세요.
ondblclick 속성은 현재 요소(element)의 onDblClick 이벤트 핸들러 코드를 돌려줍니다.
문법
element.ondblclick = function;
function
은 사용자 정의 함수이며, () 나 변수를 제외하고 생성할 수 있고 또는 아래와 같이 함수명을 선언하지 않고 생성할 수 있습니다.
element.ondblclick = function() { console.log("ondblclick event detected!"); };
예제
<html> <head> <title>ondblclick event example</title> <script type="text/javascript"> function initElement() { var p = document.getElementById("foo"); // NOTE: log(); or log(param); will NOT work here. // Must be a reference to a function name, not a function call. p.ondblclick = log; }; function log() { console.log("ondblclick Event detected!") } </script> <style type="text/css"> <!-- #foo { border: solid blue 2px; } --> </style> </head> <body onload="initElement()"> <span id="foo">My Event Element</span> <p>double-click on the above element.</p> </body> </html>
메모
사용자가 요소(element)를 더블클릭하면 더블클릭 이벤트가 발생합니다.
명세
명세 | 상태 | 비고 |
---|---|---|
HTML Living Standard The definition of 'ondblclick' in that specification. |
Living Standard |
브라우저 호환성
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
특성 | 크롬 | 엣지 | 파이어폭스 (게코) | 인터넷 익스플로어 | 오페라 | 사파리 (웹킷) |
---|---|---|---|---|---|---|
기본지원 | (Yes) | (Yes) | ? | ? | ? | ? |
특성 | 안드로이드 | 안드로이드 웹뷰 | 파이어폭스 모바일 (게코) | 파이어폭스 OS | 엣지 | 인터넷 익스플로어 모바일 | 오페라 모바일 | 사파리 모바일 | 크롬 (안드로이드) |
---|---|---|---|---|---|---|---|---|---|
기본지원 | No support | No support | ? | ? | ? | ? | ? | ? | No support |