The event is onmouseup
: http://www.w3schools.com/jsref/event_onmouseup.asp
Or mouseup
if you're calling element.addEventListener or using one of the JavaScript frameworks that drop the "on" part of the name.
Update:
If you want to listen for any mouse up event, you'll need to register an onmouseup listener on the page body in your onmousedown callback, and then unregister the onmouseup listener from within the onmouseup callback (so it only happens once).
If you're using jQuery, this can be accomplished with the one() function.
Of course, if the user moves their mouse outside of the browser window before releasing their button, you won't get the mouseup event. I'm not sure if there's anything you can do about that.