欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
為Html 的Select 加一個(gè)提示語(yǔ)和輸入方法
為Html 的Select 加一個(gè)提示語(yǔ)和輸入方法 收藏此頁(yè)到茶秀網(wǎng)摘
作者: xieyj(原作)   www.ASPCool.com 時(shí)間:2005-10-20 上午 01:19:46  閱讀次數:322

     <Html>
  <Head>
  <SCRIPT LANGUAGE="JavaScript">
  <!--
  //定義 select 原值
  var oldValue,oldText;
  //select下拉框的onkeydown事件,修改下拉框的值
  function catch_keydown(sel)
  {
   switch(event.keyCode)
   {
   case 13: //回車(chē)鍵
   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;
  }
  
  //恢復select下拉列表當前選中的值
  function LoadSelect(obj,value)
  {
   for (var i=0; i< obj.options.length; i++)
   if (obj.options[i].value == value)
   {
   obj.selectedIndex = i;
   break;
   }
  }
  
  //select 選擇框鼠標上移時(shí)提示選擇的內容
  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 選擇框鼠標移開(kāi)時(shí)消失
  function selMouseOut(obj)
  {
   with (document.all.div_hint)
   {
   style.display = "none"
   }
  }
  //-->
  </SCRIPT>
  </Head>
  <Body>
  <!--調用-->
  <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=‘‘></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>

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
js中,兩種獲得選中Option的方法
HTML中的<select>標簽如何設置默認選中的選項
js實(shí)現多級聯(lián)動(dòng)下拉框
網(wǎng)頁(yè)制作 HTML中select選擇菜單跳轉“當前窗口”或“新窗口”
select的onChange事件問(wèn)題解決
JavaScript控制ComboBox中Option的增加和刪除(原)-JavaScri...
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久