Khi thả nút chuột trên một phần tử, onmouseup trình kích hoạt sự kiện. Bạn có thể thử chạy mã sau để triển khai onmouseup thuộc tính -
Ví dụ
<!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>