Mouse Up Down Out Over Click Animate Picture

[Total: 0    Average: 0/5]

This shows how to have a mouseup, mouseover, mouseclick, mousedown, mouseup event all trigger a picture to change.

Body Code:

<script type=text/javascript>
var _p = "";
function si(_n) {
  document.images[_n].src = _p;
<a href="#" onclick="si('clk')">click me</a>
<a href="#" onmouseover="si('mov')">mouse over me</a>
<a href="#" onmouseout="si('mou')">mouse out of me</a>
<a href="#" onmousedown="si('md')">mouse down</a>
<a href="#" onmouseup="si('mu')">mouse up</a>
<BR>Click: <img name=clk src="">
<BR>Over:  <img name=mov src="">
<BR>Out:   <img name=mou src="">
<BR>Down:  <img name=md  src="">
<BR>Up:    <img name=mu  src="">

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *