当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 内容如标题。 ......
 ·分页问题(在线等)    »显示摘要«
    摘要: 我想实现分页显示,请帮我看看下面代码那里错了! <% const adopenstatic=3 const adlockpessiomistic=2 数据库连接 set conn=server.createobject("adodb.connection") set rs=server.createobject("adodb.reco......


asp中怎么编写既能自己输入又能选择的下拉列表框

我查过原来的问题  
  有位高手解决了  
  但是我没看懂  
  有哪位高手详细解说一下吗?

NO.1   作者: quady

抄来的,记得是孟子兄弟的。  
   
  <body     leftmargin="50"   topmargin="50">  
   
  <style>  
  .optionForSel   {font-size:9pt}  
  </style>  
   
  <table   cellpadding="0"   cellspacing="0"   border="0"   width="300">  
  <tr>  
  <td   id="selectLength"   width="100%"   style="height:20px;padding:0px;border:2px   inset   #404040;border-right:0px;border-bottom:1px   solid   #D4D0C8;font-size:9pt;">  
  <div   id="selectedValue"   style="padding:2px;border:0px;width:100%;height:20px;font-size:9pt;vertical-align:bottom"></div>  
  </td>  
  <td   width="20"   style="height:20px;padding:0px;border-top:2px   inset   #404040;border-left:0px;border-right:1px   solid   #D4D0C8;border-bottom:1px   solid   #D4D0C8;font-size:9pt">  
  <img   src="button2.gif"   width="20"   height="21"   border="0"   id="mm"   onclick="mm_Click()"   align="absmiddle">  
  </td>  
  </tr>  
  </table>  
  <div   id="dropdownOption"   style="position:absolute;visibility:hidden;width:100%;border:1px   solid   #080808;z-index:1000">  
  <table   width="100%"   cellpadding="0"   cellspacing="1"   class="optionForSel"   bgcolor="White">  
  <tr   onmouseover="this.style.backgroundColor=#0099ff"   onmouseout="this.style.backgroundColor=">  
  <td   onclick="document.all.selectedValue.innerText=this.innerText">  
  <img   src="copyright.gif"   border="0"   align="absmiddle"   hspace="2"><a   href="http://lucky.myrice.com">Visit1</a>  
  </td>  
  </tr>  
  <tr>  
  <td   onmouseover="this.style.backgroundColor=#0099ff"   onmouseout="this.style.backgroundColor="onclick="document.all.selectedValue.innerText=this.innerText">  
  <img   src=meng1.gif   border="0"   align="absmiddle"   hspace="2"><a   href="http://lucky.myrice.com">Visit2</a>  
  </td>  
  </tr>  
  <tr>  
  <td   onmouseover="this.style.backgroundColor=#0099ff"   onmouseout="this.style.backgroundColor="onclick="document.all.selectedValue.innerText=this.innerText">  
  <img   src=meng2.gif   border="0"   align="absmiddle"   hspace="2"><a   href="http://lucky.myrice.com">Visit3</a>  
  </td>  
  </tr>  
  </table>  
  </div>  
   
  <script>  
  function   mm_Click()  
  {  
  if(document.all.dropdownOption.style.visibility   ==   visible)  
  document.all.dropdownOption.style.visibility=hidden  
  else  
  document.all.dropdownOption.style.visibility=visible  
  }  
  function   init(){  
  document.all.dropdownOption.style.width   =   document.all.selectLength.clientWidth   +   22;  
  document.all.selectedValue.contentEditable   =   true;  
  var   str   =   0;  
  var   strLeft   =   0;  
  var   e1   =   document.all.selectLength;  
  while(e1.tagName   !=   "BODY")  
  {  
  str   +=   e1.offset  
  strLeft   +=   e1.offsetLeft  
  e1   =   e1.offsetParent  
  }  
  document.all.dropdownOption.style.top   =   String(str   +   24)   +   "px";  
  document.all.dropdownOption.style.left   =   String(strLeft)   +   "px";  
  }  
   
  function   clickE()  
  {  
  if(window.event.srcElement.id   !=mm)  
  document.all.dropdownOption.style.visibility=hidden;  
  }  
   
  document.onclick   =   clickE  
  window.onload   =   init  
  </script>  
  <br>  
  <br>  
  <input   onclick="alert(document.all.selectedValue.innerText)"   type="button"   value="得到值">

NO.2   作者: dgm8

你查仔细一点  
  <select   onchange=document.all("t1").value=this.value>  
      <option   value="1">1  
      <option   value="2">2  
  </select>  
  <input   type="text"   id="t1">

NO.3   作者: wanderingbird

试试这个:  
   
  <select   name="select"   style="position:absolute;   left:   197px;   top:   80px;   width:   120px;   height:   22px;   clip:   rect(0   120   22   100)"   id="select"   onchange="clientUser.value=select.options[select.selectedIndex].text;clientUser.select()">  
                                          <option   value="1"   selected>aaaaaa</option>  
        <option   value="2">bbbbb</option>  
  </SELECT>    
  <input   type="text"   style="position:absolute;   left:   198px;   top:   81px;   width:   100px;   height:   18px"   name="clientUser"   value="请选择二批名称"   onfocus="this.select();">  
 

NO.4   作者: superdullwolf

一般是做两个并列的,一个是text,一个是select    
  <INPUT   type="text"   id=text1   name=text1>  
  <SELECT       id=select1   name=select1   onchange="text1.value   =select1.value">  
  <OPTION   value=1>1</OPTION>  
  <OPTION   value=2>2</OPTION>  
  </SELECT>  
  既能自己输入又能选择的下拉列表框,不实用的。


    摘要: 各位大蝦: 我寫了一個很簡單的讀本地文件的程式,放在本機磁盤上能順利讀出,但是我把它copy到網絡磁碟機上就不能運行,報錯: system.security.securityexception: 型別 system.security.permissions.fileiopermis sion, mscorlib, version=1.0.2411.0, culture=neutral, p......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE