Wednesday, 18 May 2011

HTML : Event onMouseover onMouceout



Event: Event is an action of a controlee. If you want to execute any functionality based on the action perform on a controlee, we are using event attributes.
Every controlee is providing number of attributes.  
Ex: onclick, onmouse over, onmouseout.
Note: What statements we are including with image attributes that comes under Java Script statements.
Sample Script:
<img src="file:///F|/Demo/1.jpg" onClick="src='file:///F|/Demo/2.JPG'" onMouseOver="src='file:///F|/Demo/3.jpg'" onMouseOut="src='file:///F|/Demo/1.jpg'">
Save this script with .html extension. And the place of red mark, please provide URL of your image which is located in your system.
Sample Script:
<img src="file:///F|/Demo/1.jpg" width="600" id="k" />
<br />
<img src="file:///F|/Demo/2.JPG" width="200" onClick="k.src='file:///F|/Demo/2.JPG'">
<img src="file:///F|/Demo/3.JPG" width="200" onClick="k.src='file:///F|/Demo/3.JPG'">
<img src="file:///F|/Demo/4.JPG" width="200" onClick="k.src='file:///F|/Demo/4.JPG'">
Save this script with .html extension. And the place of red mark, please provide URL of your image which is located in your system. This script works in only Internet Explore.

Sample Script:
<a href = "http://www.danphp.com" style="font-size:'30'"
onMouseover="style.fontSize='50';style/textDecoration='none';style.color='red'"
onMouceout='underline';style.color='blue'">HTML Notes</a>
Save this script with .html extension.

2 comments:

  1. Jackson loved meeting his Aunt Rosemary! php notes was en route to her brother's graduation in Auburn php notes decided to stop by.

    ReplyDelete
  2. Wow, have things changed since my last post! As many of php notes know, the South php notes ripped apart by devastating tornadoes on Wednesday, April 27, 2011. Thankfully, the F-5 tornado that php notes headed right towards our home in Birmingham diverted slightly north, and unfortunately hit 5 miles north of us. Tuscaloosa, Birmingham, and many other cities are facing devastating losses.

    ReplyDelete