Captured Technology

Implementing Firefox Onmouseover In HTML

Oct 09 2013

English: Firefox word mark. Correct clear spac...

English: Firefox word mark. Correct clear space (1/3 height of "F") and color (#D64203) from (Photo credit: Wikipedia)

Implementing Firefox Onmouseover In HTML

When writing the code for a website, it is imperative that the code can support all browsers. For example, the onmouseover event code might work in Internet Explorer or Chrome, but might have to be altered in order for the code to execute properly in Firefox. The Firefox onmouseover event executes a script that performs a specific function, such as enlarging an image.

Although onmouseover is supported by most major browsers, the code to execute this event may be different from browser to browser. JavaScript or HTML can be used to implement this event.

The Firefox onmouseover event can be implemented by first specifying the element you want to change. Usually this element is an image and you would use the HTML "img" tag. Next, onmouseover should be set equal to a piece of JavaScript code. This code will specify what the element will do when the cursor rolls over the element. Usually, the element will be enlarged or changed to a different element.

Thus, the Firefox onmouseover code will look like this in HTML:

"element" followed by "onmouseover= 'JavaScriptCode'"

where "element" is an object, such as a picture, "onmouseover" is the event, and "JavaScriptCode" is what the picture will do when the Firefox onmouseover event is called. Remember to provide a source, usually the file name, for your image so the onmouseover event can be properly executed.

The Firefox onmouseover event can make a website more entertaining and interactive. The code is supported by all browsers and is fairly easy to use. The onmouseover event can also be used in combination with other events, or can be used for other actions, to spice up a website even more. See my code here.

Blog Directory

Latest technology news.
 Steve Patterson
 414  245421  6/12/2017




Blog Calendar