Home :: Tutorials :: SVG :: Events

Click Event

<rect x="5" y="5" width="40" height="40" fill="red"
      onclick="changeColor(evt)"/>

Mousedown Event

<rect x="5" y="5" width="40" height="40" fill="red"
      mousedown="changeColor(evt)"/>

Mouseup Event

<rect x="5" y="5" width="40" height="40" fill="red"
      mouseup="changeColor(evt)"/>

Mouseover Event

<rect x="5" y="5" width="40" height="40" fill="red"
      mouseover="changeColor(evt)"/>

Mouseout Event

<rect x="5" y="5" width="40" height="40" fill="red"
      mouseout="changeColor(evt)"/>

Mousemove Event

<rect x="5" y="5" width="40" height="40" fill="red"
      mousemove="changeColor(evt)"/>