我們的生活越來越精彩
          學(xué)無止境,恒心,毅力,堅(jiān)持
          posts - 20,  comments - 6,  trackbacks - 0

          輸入框的提示:
          1.

          <!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" xml:lang="en" lang="en">

          <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+120;
          var t=document.getElementById(id).offsetTop;
          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>

           
          姓名:<input type="text" id="username" onfocus="tips('username','姓名長度最多16個(gè)字符')" onblur="outtips()" />

           
          密碼:<input type="password" id="password" onfocus="tips('password','密碼長度必須在3-18位之間')" onblur="outtips()" />
          </body>
          </html>


          本文來自: 腳本之家(www.jb51.net) 詳細(xì)出處參考:http://www.jb51.net/article/11170.htm

          2.

          姓名:<input type="text" id="username" onMouseOver="this.focus()"   onBlur="if   (value   ==''){value='請(qǐng)輸入關(guān)鍵字'}"   onFocus="this.select()"   onClick="if(this.value=='請(qǐng)輸入關(guān)鍵字')this.value=''"/>


          3.
          posted on 2008-05-12 15:04 鳥生魚湯 閱讀(306) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           

          <2008年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          常用鏈接

          留言簿(2)

          隨筆檔案

          文章檔案

          喜歡的技術(shù)博客

          喜歡的有意思有味道的博客 放松并鼓勵(lì)自己

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 德江县| 广宁县| 榕江县| 获嘉县| 天长市| 盈江县| 清苑县| 扎囊县| 忻州市| 尤溪县| 丹凤县| 酒泉市| 济宁市| 云浮市| 沙田区| 新闻| 阳原县| 东阳市| 兴化市| 安国市| 阿瓦提县| 桦川县| 大连市| 唐山市| 甘德县| 澄城县| 淄博市| 馆陶县| 麻江县| 达拉特旗| 华安县| 仲巴县| 松原市| 恩平市| 宜兴市| 漳平市| 崇阳县| 九龙坡区| 甘泉县| 白河县| 石泉县|