mousedown

< dom‎ | events
Jump to: navigation, search



Overview Table

Synchronous No
Bubbles No
Target dom/Element
Cancelable No
Default action

Examples

View live exampleThis example shows how to determine the origin of the onmousedown event when event bubbling is used.

<BODY onmousedown="console.log(event.srcElement.tagName)">
<TABLE BORDER=1>
  <TH>Click the items below with your mouse.</TH>
  <TR><TD><BUTTON>Click Me</BUTTON></TD></TR>
  <TR><TD><INPUT TYPE=text VALUE="Click Me"></TD></TR>
  <TR><TD><SPAN>Click Me</SPAN></TD></TR>
</TABLE>
<P>This code retrieves the tagName of the object on which
   the onmousedown event has fired.
</BODY>

Notes

Remarks

Use the button property to determine which mouse button is clicked. Initiates actions associated with the event and with the object being clicked. To invoke this event, do one of the following:

  • Click a mouse button.

Syntax

Standards information


Event handler parameters

pEvtObj [in]
Type: IHTMLEventObj

See also

Related pages (MSDN)

  • a
  • abbr
  • acronym
  • address
  • applet
  • area
  • audio
  • b
  • bdo
  • big
  • blockQuote
  • body
  • button
  • canvas
  • caption
  • center
  • cite
  • code
  • custom
  • dd
  • del
  • dfn
  • dir
  • div
  • dl
  • document
  • dt
  • em
  • embed
  • fieldSet
  • font
  • form
  • hn
  • hr
  • i
  • img
  • input type=button
  • input type=checkbox
  • input type=file
  • input type=image
  • input type=password
  • input type=radio
  • input type=reset
  • input type=submit
  • input type=text
  • ins
  • kbd
  • label
  • legend
  • li
  • listing
  • map
  • marquee
  • menu
  • noBR
  • object
  • ol
  • p
  • plainText
  • pre
  • q
  • rt
  • ruby
  • s
  • samp
  • select
  • small
  • source
  • span
  • strike
  • strong
  • sub
  • sup
  • table
  • tBody
  • td
  • textArea
  • tFoot
  • th
  • tHead
  • tr
  • tt
  • u
  • ul
  • var
  • video
  • window
  • xmp
  • SVGSVGElement
  • Reference
  • onmousewheel
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • onmspointerdown

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]