What is Mouse Events in HTML5

In this article I have describe about HTML5 Mouse Events.
  • 2897

What is HTML5 Mouse Events

  • Trigger events is added HTML4 in our browser, like starting Javascript functionality when the event occurs to click on an element.
  • We can respond to an event using an event handler attribute.
  • Each HTML element can support a number of distinct event handler attributes.
  • Global event attributes that can be added to HTML5 elements.

Keyboard Events

Events triggered by a keyboard (applies to all HTML5 elements)

Attribute

Value

Description

onkeydown

Script

A key is pressed down when script to be run

onkeyup

Script

A key is released when script to be run

onkeypress

Script

A key is pressed and released when script to be run

Mouse Events

Events triggered by a mouse, or similar user actions (applies to all HTML5 elements)

Attribute

Status

Value

Description

onclick

No change

Script

A mouse click when script to be run

ondblclick

No change

Script

A mouse double-click when script to be run

ondrag

New

Script

An element is dragged when script to be run

ondragend

New

Script

Script to be run at the end of a drag operation

ondragenter

New

Script

An element has been dragged to a valid drop target when script to be run

ondragleave

New

Script

An element leaves a valid drop target when script to be run

ondragover

New

Script

An element is being dragged over a valid drop target when script to be run

ondragstart

New

Script

Script to be run at the start of a drag operation

ondrop

New

Script

Dragged element is being dropped when script to be run

onmousedown

No change

Script

A mouse button is pressed when script to be run

onmousemove

No change

Script

The mouse pointer moves when script to be run

onmouseout

No change

Script

The mouse pointer moves out of an element when script to be run

onmouseover

No change

Script

The mouse pointer moves over an element when script to be run

onmouseup

No change

Script

A mouse button is released when script to be run

onmousewheel

New

Script

The mouse wheel is being rotated when script to be run

onscroll

New

Script

An element's scrollbar is being scrolled when script to be run

You may also want to  read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.