没有见过啊哪里有这样的例子吗?只能用两个form来处理这种情况把

解决方案 »

  1.   

    <body leftmargin=3><form name=form1 ><br><span style=font-size=12>输入要查找的关键字:</span><br><input class=input type=text name=index value=''  class=buttonface  onkeyDown="
    for(i=0;i<document.form1.help_index.length;i++)
    {
     var len=this.value.length;
     if(len>0)
       if(document.form1.help_index.options[i].text.substring(0,len)==this.value.substring(0,len))
    {
         document.form1.help_index.options[i].selected=true;
     break;
      }
    }

    onkeyUp ="
    for(i=0;i<document.form1.help_index.length;i++)
    {
     var len=this.value.length;
      if(len>0)
       if(document.form1.help_index.options[i].text.substring(0,len)==this.value.substring(0,len))
    {
         document.form1.help_index.options[i].selected=true;
     break;
      }
    }
    "
    ><table width=100% border=0 cellpading=2 cellspacing=0 class=bordergr align=center><tr  ><td bgcolor=white width=100% ><select name=help_index size=10 style=width:100%;border:0;bgcolor:000000;color:ff0000><option value='0903000000'>个人</option><option value='0702000000'>个人修改</option><option value='6809020000'>工作权限</option><option value='6809010000'>工作组</option><option value='1001000000'>管理阅读</option><option value='1002000000'>维护</option><select></td></tr></table></form>
      

  2.   

    To seabell(百合心)
    多谢你了,你的创意确实不错,但是我想实现的是只有一个select框呀,能做到么,多谢你了
      

  3.   

    下面代码是我从网上保存的(具体是在哪里,记不清了),原来的帖子我找不到了,不知道合不合您的要求:<HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    var o = null;
    var isNN = (navigator.appName.indexOf("Netscape")!=-1);
    function beginEditing(menu) {
    finish();
    if(menu[menu.selectedIndex].value != "read-only") {
    o = new Object();
    o.editOption = menu[menu.selectedIndex];
    o.editOption.old = o.editOption.text;
    o.editOption.text = "_";
    menu.blur();
    window.focus();
    document.onkeypress = keyPressHandler;
    }function keyPressHandler(e){
    var option = o.editOption;
    var keyCode = (isNN) ? e.which : event.keyCode;
    if(keyCode == 8 || keyCode == 37)
    option.text = option.text.substring(0,option.text.length-2) + "_";
    else if (keyCode == 13) {
    finish();
    } else
    option.text = option.text.substring(0,option.text.length-1) + String.fromCharCode(keyCode) + "_";
    status = keyCode;
    }function finish() {
    if(o != null) {
    option = o.editOption;
    if(option.text.length > 1)
    option.text = option.text.substring(0,option.text.length-1);
    else
    option.text = option.old;
    document.onkeypress = null;
    o = null;
    }
    }
    }//  End -->
    </script>
    </HEAD>
    <BODY>
    <center>
    <form>
        <select onChange="beginEditing(this);">
          <option value="read-only">Select an option to edit it.</option>
          <option value="read-only">---------------------------- </option>
          <option value="last">SurName</option>
          <option value="first">FirstName</option>
          <option value="email">Email</option>
          <option value="add1">Address 1</option>
          <option value="add2">Address 2</option>
        </select>
    </form>
    </center>
      

  4.   

    To michael_monkey(从头再来)只能输入,不能删除呀,而且选择中,并没有显示在框中呀
      

  5.   

    http://lcuky.myrice.com/temp/combobox.htm
      

  6.   

    http://lucky.myrice.com/temp/combobox.htm
      

  7.   

    To zico(zico) 就象IE的地址栏一样的功能呀,没有么?
      

  8.   

    http://www.csdn.net/develop/Read_Article.asp?Id=15197
      

  9.   

    To net_lover(孟子E章)他好象没有定位的功能呀,能实现么,多谢你了
      

  10.   

    To bencalie(Bencalie)他仍然没有象IE定位的功能,还有这方面的资料么,多谢你了
      

  11.   

    IE定位的功能?Please explain it.
      

  12.   

    To bencalie(Bencalie)比如,select框中有以下数据
    1
    123
    1234
    12345
    当我输入1的时候,1就被选中,当我输入12的时候,就滚动到123,当我输入1234时候,就滚动到1234这一列能做到么,多谢你了!
      

  13.   

    <style>
    .arrow {
    font-family: Webdings;
    font: 9pt;
    color: blue;
    text-align: center;
    cursor: hand;
      background:  white;
    }
    .seltxt{
    border-left:0;
    border-right:0;
    border-top:0;
    border-bottom:1 solid #000000;
    }
    </style>
    <script>
    str="";
    mywidth=0;
    function showdiv(w)
    {
    document.all.mysel.style.display="none";
    str="<input type=text class=seltxt style='width:"+w+";' onkeyup=mysearch(this) onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    liststr="<table style='border:1 solid #000000;' width="+w+" cellspacing=0 cellpadding=0>";
    for(i=0;i<document.all.mysel.options.length;i++)
    liststr+="<tr><td id=td"+i+" style='font-size:10pt' onmouseover=myover() onmouseout=myout() onclick=myclick("+i+")>"+document.all.mysel.options[i].text+"&nbsp;&nbsp;&nbsp;</td></tr>";
    liststr+="</table>";
    likesel.innerHTML=str;
    mywidth=w;
    }
    function showlist()
    {
    if(likesel.innerHTML.indexOf("TABLE")==-1)
    likesel.innerHTML+=liststr;
    }
    function myover()
    {
    event.srcElement.style.cursor="default";
    event.srcElement.style.color="white";
    event.srcElement.style.background="darkblue";
    }
    function myout()
    {
    event.srcElement.style.color="";
    event.srcElement.style.background="";
    }
    function myclick(j)
    {
    document.all.mysel.selectedIndex=j;
    str="<input type=text class=seltxt style='width:"+mywidth+";' onkeyup=mysearch(this) onclick=showlist() value="+document.all.mysel.options[document.all.mysel.selectedIndex].text+">";
    likesel.innerHTML=str;
    document.all.arrow.disabled=false;
    }
    oldtd="td1";
    function mysearch(obj)
    {
    for(i=0;i<mysel.options.length;i++)
    {
    if(mysel.options[i].text.substring(0,obj.value.length)==obj.value)
    {
    document.all(oldtd).style.color="";
    document.all(oldtd).style.background="";
    document.all("td"+i).style.color="white";
    document.all("td"+i).style.background="darkblue";
    oldtd="td"+i;
    mysel.options[i].selected=true;
    return;
    }
    }
    }
    </script>
    <body onload="showdiv(mysel.offsetWidth)">
    <select name=mysel>
    <option value=11 selected>1111111
    <option value=12>111112
    <option value=13>1111111113
    <option value=13>111111888
    </select>
    <table border=0><tr><td><span id=likesel></span></td><td valign=top><span id=arrow class=arrow onclick=showlist()>6</span></td></tr></table>