init
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* TOOLTIP 정보를 보여준다.
|
||||
* 사용법 -
|
||||
* 1. 툴팁 DIV 선언
|
||||
* <div id="tooltip" style="position:absolute;visibility:hidden;border:1px solid black;font-size:12px;layer-background-color:lightyellow;background-color:lightyellow;padding:1px">
|
||||
* </div>
|
||||
* 2. 보여주려는 위치에..
|
||||
* onMouseover="showtip(this,event,'0')" onMouseOut="hidetip()"
|
||||
* toppos 선언해야함.
|
||||
*/
|
||||
|
||||
function showtip(current,e,index)
|
||||
{
|
||||
if (document.layers) // Netscape 4.0+
|
||||
{
|
||||
theString="<DIV>"+tip[index]+"</DIV>"
|
||||
document.tooltip.document.write(theString)
|
||||
document.tooltip.document.close()
|
||||
document.tooltip.left=e.pageX+14
|
||||
document.tooltip.top=e.pageY
|
||||
document.tooltip.visibility="show"
|
||||
}
|
||||
else
|
||||
{
|
||||
if(document.getElementById) // Netscape 6.0+ 과 Internet Explorer 5.0+
|
||||
{
|
||||
elm=document.getElementById("tooltip")
|
||||
elml=current
|
||||
elm.innerHTML=tip[index]
|
||||
elm.style.height=elml.style.height
|
||||
elm.style.top=parseInt(event.clientY-5)
|
||||
elm.style.left=parseInt(event.clientX+10)
|
||||
elm.style.visibility = "visible"
|
||||
}
|
||||
}
|
||||
}
|
||||
function hidetip()
|
||||
{
|
||||
if (document.layers) // Netscape 4.0+
|
||||
{
|
||||
document.tooltip.visibility="hidden"
|
||||
}
|
||||
else
|
||||
{
|
||||
if(document.getElementById) // Netscape 6.0+ 과 Internet Explorer 5.0+
|
||||
{
|
||||
elm.style.visibility="hidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user