JavaScript OnMouseDown And OnMouseUp Event
Example
<body>
<img src="images/Winter.jpg" width="300" height="250" onMouseDown="this.src='images/Water lilies.jpg';" onMouseUp="this.src='images/Winter.jpg';" />
<br>
<img src="images/Water lilies.jpg" width="300" height="250" onMouseOver="this.src='images/Winter.jpg';" onMouseOut="this.src='images/Water lilies.jpg';" />
<br>
<img src="images/Winter.jpg" width="300" height="250" onMouseDown="this.src='images/Blue hills.jpg';" onMouseUp="this.src='images/Winter.jpg';" onMouseOver="this.src='images/Water lilies.jpg';" onMouseOut="this.src='images/Winter.jpg';" />
</body>
Example
<body>
<img src="images/Winter.jpg" width="300" height="250" onMouseDown="this.src='images/Water lilies.jpg';" onMouseUp="this.src='images/Winter.jpg';" />
<br>
<img src="images/Water lilies.jpg" width="300" height="250" onMouseOver="this.src='images/Winter.jpg';" onMouseOut="this.src='images/Water lilies.jpg';" />
<br>
<img src="images/Winter.jpg" width="300" height="250" onMouseDown="this.src='images/Blue hills.jpg';" onMouseUp="this.src='images/Winter.jpg';" onMouseOver="this.src='images/Water lilies.jpg';" onMouseOut="this.src='images/Winter.jpg';" />
</body>
No comments:
Post a Comment