Javascript DOM Mouse Up Event
<!DOCTYPE html> <html lang="en"> <body> <form action="" name="form1"> <input type="button" name="myButton" value="Mouse goes up" /> </form> <script> let myButton = document.form1.myButton; function myButtonMouseup() { myButton.value = "Mouse Goes Up"; } // ww w . jav a 2s .c o m function myButtonMousedown() { myButton.value = "Mouse Goes Down"; } myButton.addEventListener("mousedown", myButtonMousedown); myButton.addEventListener("mouseup", myButtonMouseup); </script> </body> </html>