我們的生活越來越精彩
          學無止境,恒心,毅力,堅持
          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個字符')" onblur="outtips()" />

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


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

          2.

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


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

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

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

          常用鏈接

          留言簿(2)

          隨筆檔案

          文章檔案

          喜歡的技術博客

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

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 固镇县| 丰原市| 珲春市| 威信县| 西宁市| 大连市| 江油市| 中西区| 清新县| 榕江县| 彭阳县| 尖扎县| 阿尔山市| 湘阴县| 罗定市| 鹿邑县| 安徽省| 临海市| 承德县| 台中县| 仁寿县| 温州市| 梨树县| 佛教| 洪湖市| 安图县| 吴川市| 兰西县| 儋州市| 黑龙江省| 达拉特旗| 汕尾市| 新乐市| 孝昌县| 文山县| 财经| 迁西县| 潍坊市| 龙山县| 璧山县| 改则县|