풍선도움말 div display

Language/JAVASCRIPT 2010. 5. 19. 18:57

<html>
<head>
<script>
/*풍선 도움말*/
var nav = (document.layers);
var iex = (document.all);

function pop(msg,bak,width,titlemsg) {
        if(msg == "") return;
        var skn = document.all.topdecks;
        var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1 BGCOLOR=#505050><TR><TD>"+
             "<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR align=center height=22><TD><B><font color=white>"+titlemsg+"</B></TD></TR></TABLE>"+
             "<TABLE cellpadding=0 cellspacing=0 BGCOLOR="+bak+"><TR><TD style='padding:5;'><FONT COLOR=#000000><nobr>"+msg+"</nobr></FONT></TD></TR></TABLE></TD></TR></TABLE>";

    skn.innerHTML = content;
    skn.style.display = "";
}
function get_mouse(e) {
    var skn = document.all.topdecks;
    var x = (nav) ? e.pageX : event.x+document.body.scrollLeft;
    var y = (nav) ? e.pageY : event.y+document.body.scrollTop;
    skn.style.left = x - 0;
    skn.style.top  = y+20;
}
function kill() {
        var skn = document.all.topdecks;
        skn.style.display = "none";
}
document.onmousemove = get_mouse;
</script>
</head>
<body>

<div id="topdecks" name="topdecks" style="position : absolute;display:none;">&nbsp;</div>

<a href="http://wsabstract.com" ONMOUSEOVER="pop('여기에 풍선도움말 내용을 입력하세요.','lightgreen','200','title1')"; ONMOUSEOUT="kill()">풍선도움말 1</a>
<a href="http://webmonkey.com" ONMOUSEOVER="pop('여기에 풍선도움말 내용을 입력하세요.','lightblue','300','title2')"; ONMOUSEOUT="kill()">풍선도움말 2</a>

</body>
</html>

: