This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.


Overview Table

Synchronous No
Bubbles No
Target dom/Element
Cancelable No
Default action ?
## Examples

This example shows how to fire the onlosecapture event. When the user clicks the mouse, the releaseCapture method is invoked and subsequently fires the onlosecapture event.

<BODY onload="divOwnCapture.setCapture()"
<DIV ID=divOwnCapture
        + event.clientY";
        + ' lost mouse capture.')">
<P>Mouse capture has been set to this gray division (DIV) at
   load time using the setCapture method. The text area will track
   the mousemove event anywhere in the document.<BR><BR>
<TEXTAREA ID=txtWriteLocation COLS=2></TEXTAREA>
<DIV ID=divNoCapture>
<P>Click anywhere on the document to invoke the releaseCapture
   method, whereby the onlosecapture event will fire.</P>

View live example



Sends the event notification to the object that is losing the mouse capture. To invoke this event, do one of the following:

  • Set mouse capture to a different object.
  • Change the active window so that the current document using mouse capture loses focus.
  • Invoke the releaseCapture method on the Document or object.

The pEvtObj parameter is required for the following interfaces:

  • HTMLAnchorEvents2
  • HTMLAreaEvents2
  • HTMLButtonElementEvents2
  • HTMLControlElementEvents2
  • HTMLDocumentEvents2
  • HTMLElementEvents2
  • HTMLFormElementEvents2
  • HTMLImgEvents2
  • HTMLFrameSiteEvents2
  • HTMLInputFileElementEvents2
  • HTMLInputImageEvents2
  • HTMLInputTextElementEvents2
  • HTMLLabelEvents2
  • HTMLLinkElementEvents2
  • HTMLMapEvents2
  • HTMLMarqueeElementEvents2
  • HTMLObjectElementEvents2
  • HTMLOptionButtonElementEvents2
  • HTMLScriptEvents2
  • HTMLSelectElementEvents2
  • HTMLStyleElementEvents2
  • HTMLTableEvents2
  • HTMLTextContainerEvents2
  • HTMLWindowEvents2


Standards information

There are no standards that apply here.

Event handler parameters

pEvtObj [in]
Type: ****IHTMLEventObj****