参考
<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>

解决方案 »

  1.   

    如有一列表框选项有: 0001 ,0002,0003,0004,1001,2002,31201,123123,12312312,12313,32123,123001;
    我在列表框里输入00则该列表框就列出以00开头的所有选项,如文本框能解决可以最好.效果就像:IE的地址栏一样,我输入HTTP://www.s则列出以http://www.s开头的所有选择,然后我用鼠标选择.
      

  2.   

    <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 ="
    if(this.value!=''&&(this.value.split(' ').length-1!=this.value.length))
    {
    first=true;
    document.form1.mysearch.style.display='block';
    document.form1.mysearch.options.length=0;
    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.mysearch.options.length++;
    document.form1.mysearch.size=document.form1.mysearch.options.length;
    document.form1.mysearch.options[document.form1.mysearch.options.length-1].text=document.form1.help_index.options[i].text;
    if(first)
    {
         document.form1.help_index.options[i].selected=true;
         document.form1.mysearch.options[document.form1.mysearch.options.length-1].selected=true;
         first=false;
         //break;
    }
      }
    }
    }
    else
    document.form1.mysearch.style.display='none';
    "
    ><table width=100% border=0 cellpading=2 cellspacing=0 class=bordergr align=center><tr><td width=100%>
    <select name=mysearch style=display:none onclick="document.form1.index.value=this.options[this.selectedIndex].text;this.style.display='none'">
    </select>
    <select name=help_index style=width:100%;border:0;bgcolor:000000;color:ff0000;display:none>
    <option>0001</option>
    <option>0002</option>
    <option>0003</option>
    <option>0004</option>
    <option>1001</option>
    <option>123001</option>
    <option>123123</option>
    <option>12312312</option>
    <option>12313</option>
    <option>2002</option>
    <option>31201</option>
    <option>32123</option>
    <select></td></tr></table></form>
      

  3.   

    你好,可能是我没把意思说清楚.是这样
    国  籍 <select size="1" name="ntcode" style="width:100px">
    <option value="USA">USA 美国</option>
    <option value="CHN">CHN 中国</option>
    <option value="CSA">CSA 中国</option>
    <option value="CAD">CAD 中国</option>
    </select>
    我在下拉框中输入C的话,就跳出一个下拉列表,该列表列出开头是C的所有国家。并在该列表中用上,下光标和鼠标选择。如输入CHN的话只有一个列值,则该列表列出CHN 中国并将其设为当前的select值。以我理解应该是<select size="1" name="ntcode" style="width:100px" OnkeyDown=abc(this)>;然后在abc中做一个层的做法,具体我不是很清楚。请教
      

  4.   

    try:http://fason.nease.net/code/form/select/editselect2.htm