자바스크립트 ondblclick 속성


  번역 결과:

on

English [ɒn] US [ɑ:n]

prep.(방향을 나타냄) to;(위치를 나타냄) on...; ..

adv.(put, wear, connect) on; [dblk'lək]

더블클릭, 더블클릭(마우스)

자바스크립트 ondblclick 속성통사론

기능: 객체를 두 번 클릭하면 발생합니다.

구문: ​​ondblclick="SomeJavaScriptCode"

매개변수: SomeJavaScriptCode 필수입니다. 이 이벤트가 발생할 때 실행할 JavaScript를 지정합니다.​

자바스크립트 ondblclick 속성예

<html>
<body>

Field1: <input type="text" id="field1" value="Hello World!">
<br />
Field2: <input type="text" id="field2">
<br /><br />
Click the button below to copy the content of Field1 to Field2.
<br />
<button ondblclick="document.getElementById('field2').value=
document.getElementById('field1').value">Copy Text</button>

</body>
</html>

인스턴스 실행 »

온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요

비디오

Q&A