Thursday, November 19, 2009

Events: onLoad,onFocus, onBlur and onChange,onMouseOver , onMouseOut and onSubmit

19.Events:

we can use the onClick event of a button element to indicate that a function will run when a user clicks on the button.
Note: the function will not be executed before the event occurs.

onSubmit:

The onSubmit event is used to validate all form fields before submit

onFocus, onBlur and onChange:

The onFocus, onBlur and onChange events are used to validation with form fields.

onLoad:

its call onload page time.

onMouseOver and onMouseOut:

onMouseOver and onMouseOut are used to create "animated" .
Below is an example of an onMouseOver event, an alert box appears when an onMouseOver event is detected:
< a href="http://www.Sun-Javascript.blogspot.com" onmouseover="alert('An onMouseOver event');" >Sun-Javascript.blogspot.com < / a >
< br / >
< br / >
< a href="http://www.Sun-Javascript.blogspot.com" onmouseout="alert('An onmouseout event1');" > Sun-Javascript.blogspot.com < / a >

No comments:

Post a Comment