laputa9000
10-17-2003, 08:10 PM
Greeting,
I would like to know how to do in "javascript" that when onMouseOver an image, and the text appear in the bottom of the image?
Spookster
10-17-2003, 08:21 PM
What does section 2 of our posting guidelines say?
http://www.codingforums.com/postguide.htm
here is an example, do you need more explanations:
<html>
<head>
</head>
<script language="JavaScript" type="text/JavaScript">
function objectSetup(){
zObj = new layerSetup("text","hidden")
}
function layerSetup(id,visibility) {
if (document.getElementById){
this.obj = document.getElementById(id).style;
this.obj.visibility = visibility;
return this.obj;
}
}
function rollOn(){
zObj.visibility = "visible";
}
function rollOff(){
zObj.visibility = "hidden";
}
</script>
<body onload="objectSetup()">
<a href="#" onmouseover="rollOn()" onmouseout="rollOff()">Roll over here</a><br>
<br>
<div id ="text">Text apears here on rollover</div>
</body>
</html>