textfield 크기에 맞게 툴팁(tooltip) 보여주는 레이어 > script

본문 바로가기

script

textfield 크기에 맞게 툴팁(tooltip) 보여주는 레이어

작성일 06-09-20 17:49

페이지 정보

작성자서방님 조회 207회 댓글 0건

본문

별 소스 아니지만..나중에 다시 생각하기 귀찮아서올림

 

<script>
    // tool tip 보이기
    function showSearchTip(e1, e2) {
        if (typeof(e2) != "undefined") {
            e2.style.display = "";
            e2.style.height = e1.offsetHeight;
            e2.style.width = e1.offsetWidth;
            e2.style.left = e1.offsetLeft;
            e2.style.top = e1.offsetTop + e1.offsetHeight;
        }
    }
    // tool tip 숨기기
    function hiddenSearchTip(e) {
        if (typeof(e) != "undefined") {
            e.style.display = "none";
        }
    }
</script>
<div id="searchTip" style="position:absolute;background-color:#f4f4f4;display:none">
<table width=100% style='font-size:9pt' height=100>
    <tr>
        <td colspan=2 height=2></td>
    </tr>
    <tr valign=top>
        <td>검색 도움말 입니다.</td>
        <td align=right><a href=# onclick="searchTip.style.display='none'">닫기</a></td>
    </tr>
</table>
</div>

<table>
    <tr>
        <td colspan=2 height=100></td>
    </tr>
    <tr>
        <td width=100></td>
        <td>
            <div id=LayerTextPos style="position:absolute;"><input type=text name=name2 size=40 onfocus="showSearchTip(LayerTextPos,searchTip);" onblur="hiddenSearchTip(searchTip)"></div>
        </td>
    </tr>
</table>

댓글목록

등록된 댓글이 없습니다.

게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기