鼠标点到文本框时的提示信息
来源:互联网 发布:吉他调音软件guitar 编辑:程序博客网 时间:2024/05/04 15:34
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<style type="text/css">
*{
margin:0px;padding:0px;font-size:12px;
}
input{
width:100px;height:20px;border:1px solid #ccc;
}
</style>
</head>
<body>
<script language="javascript">
function tips(id,str){
var l=document.getElementById(id).offsetLeft;
alert(document.getElementById(id).offsetTop); alert(document.getElementById(id).clientHeight);
var t=document.getElementById(id).offsetTop+document.getElementById(id).clientHeight+5;
document.getElementById("tips").innerHTML="提示:"+str;
document.getElementById("tips").style.left=l+"px";
document.getElementById("tips").style.top=t+"px";
document.getElementById("tips").style.display="";
}
function outtips(){
document.getElementById("tips").style.display='none';
}
</script>
<div id="tips" style="position:absolute;border:1px solid #ccc;padding:0px 3px;color:#f00;display:none;height:20px;line-height:20px;background:#fcfcfc"></div>
<br />
姓名:<input type="text" id="username" onfocus="tips('username','姓名长度最多16个字符')" onblur="outtips()" />
<br />
密码:<input type="password" id="password" onfocus="tips('password','密码长度必须在3-18位之间')" onblur="outtips()" />
</body>
</html>
- 鼠标点到文本框时的提示信息
- MSChart 鼠标 提示数据点信息
- C# 鼠标移动到按钮时显示提示信息
- 2011-12-02 08:41 MFC添加鼠标移动到控件上时的提示信息
- MFC添加鼠标移动到控件上时的提示信息
- MFC添加鼠标移动到控件上时的提示信息
- 鼠标移动到某处显示提示信息
- 文本框中显示灰色的提示信息
- 自定义必填文本框的提示信息
- 让文本框内的提示信息在激活文本框时清空
- jquery文本框提示信息
- 文本框,智能提示信息
- 给超链接添加特效-鼠标移动到上展示提示信息-提示信息跟随鼠标移动
- CSS实现的鼠标经过文本时提示信息
- 漂亮的鼠标提示的信息
- 如何实现鼠标移动到CCombox控件有详细的提示信息
- ExtJS -- QuickTip grid设置鼠标移动到行时提示第一列的信息
- 放鼠标出现的提示信息
- make** missing separator 错误解决
- windows下随机数的生成
- 使用CImage显示透明的PNG图片
- 编译linux 驱动出现device or resource busy问题
- ARM优化之局部变量的位宽
- 鼠标点到文本框时的提示信息
- Windows消息大全
- 随 机 数 算 法
- linux下的c语言的随机数算法代码
- 一个测试结构体和结构体指针的小程序
- Mysql的相关操作语句整理
- 多表插入数据
- Spring 总结(一)
- ubuntu下samba服务器配置