요소 위에서 마우스 버튼을 놓으면 onmouseup 이벤트 트리거. 다음 코드를 실행하여 onmouseup을 구현할 수 있습니다. 속성 -
예시
<!DOCTYPE html>
<html>
<body>
<h3 id = "myid" onmousedown = "mouseDown()" onmouseup = "mouseUp()">
This is demo heading.
</h3>
<p>Click above and then release.</p>
<script>
function mouseDown() {
document.getElementById("myid").style.color = "yellow";
}
function mouseUp() {
document.getElementById("myid").style.color = "blue";
}
</script>
</body>
</html>