Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at

window.onmouseup Redirect 1


An event handler for the mouseup event on the window.


window.onmouseup = funcRef;
  • funcRef is a reference to a function.


window.onmouseup = doFunc;
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<title>onmouseup test</title>

window.onmouseup = mouseup;

function mouseup() {
  alert("mouseup event detected!");

<p>click on the page with the LH mouse button, and hold down for a few
seconds, then release the button. The mouseup event fires when you
release the mouse button.</p>


The mouseup event is raised when the user unclicks the mouse button anywhere in the document.


Not part of specification.

Document Tags and Contributors

 Last updated by: Sheppy,