Computer_IT/Ajax

[JAVASCRIPT] 입력Form ToolTip 샘플

고급코드 2006. 10. 1. 17:30
반응형
 
  1.   function sign_show(arg)
  2.     {
  3.       var tipDiv = document.getElementById("tooltip");
  4.       tipDiv.style.display = "";
  5.       if (arg == 'id')
  6.      {
  7.         tipDiv.style.top  = "160px";
  8.         tipDiv.style.left = "280px";
  9.         tipDiv.innerHTML = "<div style=position:absolute;top:-8px;left:4px;z-index:3></div>사용하시는 E-MAIL 입력 메세지";
  10.       }
  11.       else if (arg == '????')
  12.      {
           이러쿵..저러쿵...
        }

       }
  13.     function sign_hide(arg)
  14.     {
  15.       var tipDiv = document.getElementById("tooltip");
  16.       tipDiv.style.display = "none";
  17.     }

<div id="tooltip" style="position:absolute;padding:6px 6px 6px 10px;width:160px;background-color:#ebe8d0;font-family:돋움;font-size:11px;border:1px dashed #c6c2a0;line-height:150%;display:none;z-index:2;"></div>

 
<input type="text" name="user_email" size="32" maxlength="200" onFocus="sign_show('email')" onBlur="sign_hide('email')">
 
반응형