这个style看起来好像不简单,从来没看见过这样的写法,帮你顶

解决方案 »

  1.   

    <style>
    #Text1  {
    z-index:19;width:200px; 
    }
    #s2  {
    z-index:19;width:200px; 
    }
    #s1 {
    position:relative;top:0px;
    width:19px; text-align:right; overflow:hidden; z-index:8;
    }
    #Select1  {
    position:relative; 
    }
    </style>
    <span id="dfd">
    <input id="Text1" type="text" value=""  /><span id="s1" onpropertychange="document.all.Select1.options[flag].innerText=this.value;"><select id="Select1"  onpropertychange="setValue(this.selectedIndex);this.parentNode.previousSibling.value = this.options[this.selectedIndex].innerText;" style="width:219px">
    <!--<span id="s1" onpropertychange="this.value=document.all.Select1.options[flag].innerText;"   这样会有stack overflow at 0-->
    <option>Combox test1</option>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    </select>
    </span>
    </span><script>
    var flag;
    window.load=loadit();  
    function  loadit()  

    //alert(document.getElementById("Text1").tagName);
    //alert(document.getElementById("s1").firstChild.clientWidth);
    //document.getElementById("s1").style.left=document.getElementById("s1").firstChild.clientWidth - 19 ;
    document.getElementById("Select1").style.left=18-document.getElementById("Select1").clientWidth;
    }  function setValue(f)
    {
    flag = f;
    }
    </script>
    我去掉了也没事,是代码其他地方的问题吧
      

  2.   

    Click the link to solve your problem.Good luck!