Обычная подсказка
<html>
<head>
<title>Обычная подсказка с измененным
цветом фона и цветом текста.</title>
<script>
//detecting
mouse objects
var ns=(document.layers)
var
ie=(document.all)
//capturing events
if
(ns){document.captureEvents(Event.MOUSEMOVE)}
document.onmousemove =
mouseMove
//x,y cordinates
function mouseMove(el) {
if (ns)
{x=el.pageX; y=el.pageY;TheLength=document.layers.length}
if (ie)
{x=event.x; y=event.y;TheLength=document.all.length}
for (i=1;
i<TheLength; i++) {
if (ns) {whichEl = document.layers[i];var
whichMove=whichEl}
if (ie) {whichEl =
document.all[i];whichMove=document.all[i].style}
if
(whichEl.id.indexOf("child")!= -1)
{
whichMove.left=x+5
whichMove.top=y+3
} }
}
//show the layer when mouseover
function sign(el,c) {
if
(ns){
document.layers["child"+c].visibility="show";
}else{
document.all["child"+c].style.visibility="visible";
}
document.onmousemove
= mouseMove
}
//hide the layer when mouseout
function hide(c)
{
if
(ns){
document.layers["child"+c].visibility="hide";
}else{
document.all["child"+c].style.visibility="hidden";
}
//release
event when hiding layer
if
(ns){releaseEvents(Event.MOUSEMOVE)}
document.onmousemove=""
}
</script>
</head>
<body>
<div id="Parent1"><a href="http://script.ru/index.htm"
onmouseover="sign('parent1',1)"
onmouseout="hide(1)">Script.ru<br></a></div>
<div
id="parent2"><a href="http://script.ru/javascript.htm"
onmouseover="sign('parent2',2)"
onmouseout="hide(2)">JavaScript<br></a></div>
<div
id="parent3"><a href="http://script.ru/forma.htm"
onmouseover="sign('parent3',3)"
onmouseout="hide(3)">Контакты<br></a></div>
<div
id="child1"
style="position:absolute;background-color:#006600;visibility:hidden">Scriptic.
- JavaScript - HTML - CSS...</div>
<div id="child2"
style="position:absolute;background-color:#006600;visibility:hidden">Коллекция
JavaScript скриптов</div>
<div id="child3"
style="position:absolute;background-color:#006600;visibility:hidden">info@scriptic.ru</div>
</body>
</html>