Monday, March 15, 2010

Onmouseover/Onmouseout Event Trap Trick

If you happen to need to do a mouse trap on certain link in HTML, you will use onmouseover and onmouseout to due with it. There is one way to save the onmouseout event trap to simplify the procedure. It is to define a fixed property to it such as the color of a table, the color of a border or even a background image. In that case, during a onmouseout event, the browser will go back to your original fixed settings. But if you purposely define how to due with it during a onmouseout event, it will still take your orders but it is redundant unless you want to change it to something else other than the original initial setting such as making the column blue and border red, etc.

In conclusion, you don’t really need a onmouseout event to change the color. Use the 'hover' feature in CSS instead.

No comments:

Post a Comment