Javascript examples for DOM Event:onmouseup
Execute a JavaScript when releasing a mouse button over a paragraph:
<!DOCTYPE html> <html> <body> <p id="myP" onmousedown="mouseDown()" onmouseup="mouseUp()"> Click the text!// ww w . j a va 2 s .co m </p> <script> function mouseDown() { document.getElementById("myP").style.color = "red"; } function mouseUp() { document.getElementById("myP").style.color = "green"; } </script> </body> </html>