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

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

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

    ZhipSoft.com
        冬去春來
            鄭重聲明:本Blog純屬個人學(xué)習(xí)、工作需要,記錄相關(guān)資料。請不要發(fā)表任何有人身攻擊的言論,謝謝?。?/font>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事件,保存下拉框原來的值
    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)上移時提示選擇的內(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)移開時消失
    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 加一個提示語和輸入方法</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純屬個人學(xué)習(xí)、工作需要,記錄相關(guān)資料。請不要發(fā)表任何有人身攻擊的言論,謝謝! www.zhipsoft.cn
    posted on 2007-05-15 10:13 ZhipSoft 閱讀(498) 評論(0)  編輯  收藏 所屬分類: JavaScript
    主站蜘蛛池模板: 免费精品一区二区三区第35| 日本免费福利视频| 无人在线观看完整免费版视频| 四虎影视大全免费入口| 亚洲AV中文无码乱人伦在线视色| 亚洲无码日韩精品第一页| 久久精品国产亚洲精品2020| 亚洲精品一二三区| 国内永久免费crm系统z在线| 国产黄色免费网站| 亚洲午夜久久久久久久久电影网 | 91免费资源网站入口| 亚洲精品视频免费观看| 亚洲免费中文字幕| 精品视频一区二区三区免费| 国产精品嫩草影院免费| 久久久国产精品亚洲一区| a级毛片免费观看网站| 免费观看美女裸体网站| 亚洲日产2021三区在线| 男女一进一出抽搐免费视频| 色播在线永久免费视频| 亚洲一区二区三区四区视频| a毛片视频免费观看影院| 日韩亚洲精品福利| 精品国产亚洲一区二区三区在线观看 | yy6080久久亚洲精品| 亚洲中文字幕久久久一区| 麻花传媒剧在线mv免费观看 | 亚洲精品自在线拍| 男女午夜24式免费视频| 色婷婷亚洲十月十月色天| 国产精品免费一区二区三区四区| 区三区激情福利综合中文字幕在线一区亚洲视频1 | ZZIJZZIJ亚洲日本少妇JIZJIZ | a毛片在线看片免费| 久久亚洲国产精品五月天| 香蕉免费一区二区三区| 久久狠狠高潮亚洲精品| 无码人妻一区二区三区免费| 亚洲欧洲综合在线|