zoukankan      html  css  js  c++  java
  • input添加提示框

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>鼠标提示</title>
    <script language="JavaScript">
    function seashowtip(tips,flag,iwidth){
    var my_tips=document.all.mytips;
    if(flag){
    my_tips.innerHTML=tips;
    my_tips.style.display="";
    my_tips.style.width=iwidth;
    my_tips.style.left=event.clientX+10+document.body.scrollLeft;
    my_tips.style.top=event.clientY+10+document.body.scrollTop;
    }
    else
    {
    my_tips.style.display="none";
    }
    }
    </script>
    <style>
    body{font-size:12px}
    </style>
    <div id=mytips style="position:absolute;background-color:#ffffff;121;height:16;border:1px solid gray;display:none;filter: progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3); left:0; top:5"></div>
    </head>
    <body>
    <form name="form1" method="post" action="">
    用户名:
    <input type="text" name="textfield" tips="*** 输入用户名." onmousemove=seashowtip(this.tips,1,150) onmouseout=seashowtip(this.tips,0,150)>
    <br/>
    密&nbsp; 码:
    <input type="text" name="textfield2" tips="*** 输入密码." onmousemove=seashowtip(this.tips,1,150) onmouseout=seashowtip(this.tips,0,150)>
    <br/>
    验证码:
    <input type="text" name="textfield3" tips="*** 输入验证码." onmousemove=seashowtip(this.tips,1,150) onmouseout=seashowtip(this.tips,0,150)>
    <input type="submit" name="Submit" value="提交">
    </form>
    </body>
    </html>

  • 相关阅读:
    按比例缩放图片,JavaScript代码
    ajax学习资料
    真正的取真实IP地址
    trac+svn+apache
    2009年的十大流行网站技术
    未能使用提供程序“RsaProtectedConfigurationProvider”进行解密
    ajax 自动保存草稿[转]
    从资源文件里加载文件(C#)
    javascript获取FCKeditor内容
    apache+php+mysql+phpadmin配置
  • 原文地址:https://www.cnblogs.com/lovelyp/p/4999872.html
Copyright © 2011-2022 走看看