onmousedown 이벤트는 마우스 버튼을 눌렀을 때 트리거됩니다.
예시
다음 코드를 실행하여 onmousedown 작업 방법을 배울 수 있습니다. 자바스크립트의 이벤트 -
<html>
<head>
<script>
<!--
function sayHello() {
alert("You clicked here.")
}
//-->
</script>
</head>
<body>
<p onmousedown = "sayHello()">This is demo text. The onmousedown event triggers when a mouse button is pressed</p>
</body>
</html>