http://webfx.eae.net/dhtml/combobox/combobox.htm

解决方案 »

  1.   

    http://webfx.eae.net/dhtml/combobox/combobox.htm
    好东西
      

  2.   

    Note: This widget only works in IE 5 or above. I am currently working on some enhancements, and a NS6 version.
      

  3.   

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

  4.   

    net_lover的方法当在同一页面中产生多个这样的框时好象有冲突。
      

  5.   

    当然能在table中用
    function ComboBox()
    {
        if(arguments.length==0)
        {
            self.status="ComboBox invalid - no name arg"
        }    this.name     = arguments[0];
        this.par      = arguments[1]||document.body
        this.view     = document.createElement("DIV");
        this.view.style.position='absolute';
        this.options  = new Array();
        this.expops   = new Array();
        this.value    = ""    this.build  = ComboBox_build
        this.make   = ComboBox_make;
        this.choose = ComboBox_choose;
        this.add    = ComboBox_add;
        this.toggle = ComboBox_toggle;
        this.update = ComboBox_update;
        this.remove = ComboBox_remove;    this.make()
        this.txtview = this.view.childNodes[0]
        this.valcon  = this.view.childNodes[1]
        if (arguments.length>1)
         this.par = eval(this.par);
        
        this.par.appendChild(this.view)
            Global_combo_array[Global_combo_array.length]=this;
        if(Global_run_event_hook){ComboBox_init()}
    }
    把原来的combox改成现在这个
    页面上这样调用
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td id="td111"><script>dm1=new ComboBox("dm1","td111")dm1.add(
           new ComboBoxItem("barge",1),
           new ComboBoxItem("benluc",2),
           new ComboBoxItem("benlieeeeck",3),
           new ComboBoxItem("taco",4)
          )
    </script></td>
    </tr></table>