The mouseOver and mouseOut Events

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email
The mouseOver event happens when the user places the mouse pointer over a hyperlink or other block element. It is accompanied by a mouseOut event, which happens when the pointer moves out of the block.

Internet Export supports mouseOver and mouseOut for all elements on a page, but Navigator supports the events only for hyperlinks and layers. This example changes the color of the heading from green normal text to blue italic text in response to mouse movement.

<HTML><HEAD>
<TITLE> mouseover and mouseout</TITLE>
</HEAD>
<STYLE type= "texticss">
<!--
HI {color:green}
-->
</STYLE> <SCRIPT language = "javascript">
<!--
function changeColor(){
head_0.style.color = "blue";
head_0.style.fontStyle = "italic";
}

function changeColorBack(){
head_0.style.color = "green";
head_0.style.fontStyle = "normal";
}
//-->

</script>
<body>
<h1 id="Head_0" on Mouseover="change Color()" onMouseout="change ColorBack()">
This is green, except when the mouse points at it. How funny!</h1>
<p>This is some body text</p>
</body>
</html>



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.