Computer_IT/Ajax
[JAVASCRIPT] 입력Form ToolTip 샘플
고급코드
2006. 10. 1. 17:30
반응형
- function sign_show(arg)
- {
- var tipDiv = document.getElementById("tooltip");
- tipDiv.style.display = "";
- if (arg == 'id')
- {
- tipDiv.style.top = "160px";
- tipDiv.style.left = "280px";
- tipDiv.innerHTML = "<div style=position:absolute;top:-8px;left:4px;z-index:3></div>사용하시는 E-MAIL 입력 메세지";
- }
- else if (arg == '????')
- {
이러쿵..저러쿵...
}
} - function sign_hide(arg)
- {
- var tipDiv = document.getElementById("tooltip");
- tipDiv.style.display = "none";
- }
<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')">
반응형