<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    ZhipSoft.com
        冬去春來(lái)
            鄭重聲明:本Blog純屬個(gè)人學(xué)習(xí)、工作需要,記錄相關(guān)資料。請(qǐng)不要發(fā)表任何有人身攻擊的言論,謝謝!!www.ZhipSoft.com
    posts - 94,comments - 149,trackbacks - 0

    <Html>
    <Head>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    //定義 select 原值
    var oldValue,oldText;
    //select下拉框的onkeydown事件,修改下拉框的值
    function catch_keydown(sel)
    {
     switch(event.keyCode)
     {
      case 13: //回車鍵
       event.returnValue = false;
       break;
      case 27: //Esc鍵
       sel.options[sel.selectedIndex].text = oldText;
       sel.options[sel.selectedIndex].value = oldValue;
       event.returnValue = false;
       break;
      case 8:  //空格健
       var s = sel.options[sel.selectedIndex].text;
       s = s.substr(0,s.length-1);
       if (sel.options[sel.selectedIndex].value==sel.options[sel.selectedIndex].text)
       {
        sel.options[sel.selectedIndex].value=s;
        sel.options[sel.selectedIndex].text=s;
       }
       event.returnValue = false;
       break;
     }
     if (!event.returnValue && sel.onchange)
      sel.onchange(sel)
    }

    //select下拉框的onkeypress事件,修改下拉框的值
    function catch_press(sel){
    if(sel.selectedIndex>=0){
     var s = sel.options[sel.selectedIndex].text + String.fromCharCode(event.keyCode);
     if (sel.options[sel.selectedIndex].value==sel.options[sel.selectedIndex].text)
     {
      sel.options[sel.selectedIndex].value=s;
      sel.options[sel.selectedIndex].text=s;
     }
     event.returnValue = false;
     if (!event.returnValue && sel.onchange)
      sel.onchange(sel)
     }
    }

    //select下拉框的onfocus事件,保存下拉框原來(lái)的值
    function catch_focus(sel) {
     oldText = sel.options[sel.selectedIndex].value;
     oldValue = sel.options[sel.selectedIndex].value;
    }

    //恢復(fù)select下拉列表當(dāng)前選中的值
    function LoadSelect(obj,value)
    {
     for (var i=0; i< obj.options.length; i++)
      if (obj.options[i].value == value)
      {
       obj.selectedIndex = i;
       break;
      }
    }

    //select 選擇框鼠標(biāo)上移時(shí)提示選擇的內(nèi)容
    function selMouseOver(obj)
    {
     with (document.all.div_hint)
     {
      innerText = obj.options[obj.selectedIndex].text;
      if (innerText.length > 0)
      {
       innerText = " " + innerText + "  ";
       style.display = "block";
       style.left = event.clientX + 16;
       style.top = event.clientY;
      }
     }
    }

    //select 選擇框鼠標(biāo)移開時(shí)消失
    function selMouseOut(obj)
    {
     with (document.all.div_hint)
     {
      style.display = "none"
     }
    }
    //-->
    </SCRIPT>
    </Head>
    <Body>
    <!--調(diào)用-->
    <select style='width:130px;z-index:-1' name='tmpSel' onmouseover=selMouseOver(this) onmouseout=selMouseOut(this) onkeydown=catch_keydown(this) onkeypress=catch_press(this) onfocus=catch_focus(this)>
     <option value='111@'>111</option>
     <option value='222@'>為 Html 的 Select 加一個(gè)提示語(yǔ)和輸入方法</option>
    </select>

    <!--提示塊-->
    <div id=div_hint style="font-size:12px;color:red;display:none;position:absolute; z-index:2; top:200;background-color: #F7F7F7; layer-background-color: #0099FF; border: 1px #9c9c9c solid;filter:Alpha(style=0,opacity=80,finishOpacity=100);"></div>
    </Body>
    </Html>


     



            本Blog純屬個(gè)人學(xué)習(xí)、工作需要,記錄相關(guān)資料。請(qǐng)不要發(fā)表任何有人身攻擊的言論,謝謝! www.zhipsoft.cn
    posted on 2007-05-15 10:13 ZhipSoft 閱讀(493) 評(píng)論(0)  編輯  收藏 所屬分類: JavaScript
    主站蜘蛛池模板: 中文字幕亚洲精品资源网| 成在人线av无码免费高潮喷水| 亚洲电影国产一区| 国产一级淫片a视频免费观看| 2020因为爱你带字幕免费观看全集| 国产福利免费视频 | 老司机午夜在线视频免费| 亚洲色偷偷偷网站色偷一区| 亚洲综合AV在线在线播放| 四虎影视免费永久在线观看| 2021国产精品成人免费视频| 久久午夜夜伦鲁鲁片免费无码| 国产免费牲交视频免费播放| 爱情岛亚洲论坛在线观看| 亚洲色欲色欲www| 亚洲视频在线观看地址| 亚洲精品成人网站在线观看| 久久久久亚洲AV成人网| 亚洲日本在线观看视频| 亚洲?V无码乱码国产精品| 日本不卡免费新一二三区| 成人免费视频软件网站| 国产乱码免费卡1卡二卡3卡| 亚洲一级免费视频| 蜜桃成人无码区免费视频网站| 成全在线观看免费观看大全| 中文在线免费视频| 99精品视频免费| 国内精品99亚洲免费高清| 精品无码一级毛片免费视频观看| 一级毛片无遮挡免费全部| 无码日韩人妻AV一区免费l| 永久免费精品影视网站| 成人午夜免费视频| 国产乱妇高清无乱码免费| 国产精品1024在线永久免费| 久久久久女教师免费一区| 四虎影视无码永久免费| 高清一区二区三区免费视频| 8x成人永久免费视频| 99久久久国产精品免费无卡顿|