网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的考试资料:

 

标题 仿163注册提示
内容
    <html>
    <head>
    <title>仿163注册提示显示-网站制作学习网</title>
    <script language="javascript">
    var forasp = new Object;
    forasp.f = function(obj,h)//obj是检测的text文本框,h是自定义要显示提示层距顶部的高度差,可以自行调节。
    {var t = document.getElementById("forasp_cn");
    t.style.top = 12 + h +"px";
    t.innerHTML=obj.title;//将显示的title放到层里面
    t.style.display="";
    }
    forasp.cl = function(obj)
    {
    var t = document.getElementById("forasp_cn");
    if (obj.value.replace(/[^\x00-\xff]/g,"**").length > obj.l);//将中文替换为两个字符
    {alert(obj.title+"长度过长!");obj.value="";obj.focus();}
    t.style.display="none";
    }
    </script>
    </head>
    <body>
    <p><input type="text" size = "25" onfocus="forasp.f(this,0);" onblur="forasp.cl(this)" l="10"><br><!--l表示内容字符的长度,title是显示的内容-->
    <input type="text" size = "25" onfocus="forasp.f(this,22);"  onblur="forasp.cl(this)" l="10"><br>
    <input type="text" size = "25" onfocus="forasp.f(this,45);"  onblur="forasp.cl(this)" l="10"><br>
    <input type="text" size = "25" onfocus="forasp.f(this,68);"  onblur="forasp.cl(this)" l="10"><br>
    <input type="text" size = "25" onfocus="forasp.f(this,91);"  onblur="forasp.cl(this)" l="10"><br></p><br>
    <div id="forasp_cn" >这里是隐藏的一个层,主要用来显示提示内容</div>
    </body>
    </html>
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/12/16 3:03:11