1>如何藏起select的边框。<select size="5" ></select> ----------------------------20分
  注意不是DropDownList那种。2>如何获得鼠标滑过的option的index。 ----------------------------------------------80分
<script>
// 如果给option添加事件,不会响应的。function fuck(oList){
    alert(window.event.scrElement.nodeName);//这里输出SELECT,所以指望通过事件获得option就别指望。
     alert(oList.selectedIndex);//这里是-1,只有click之后,option才会选中,我想滑过就选中怎么搞,因为我想修改滑过时option的背景
}
</script>
<selct size=5" onmouseover="fuck(this);">
   <option>csdn1</option>
   <option>csdn2</option>
   <option>csdn3</option>
   <option>csdn4</option>
   <option>csdn5</option>
   <option>csdn6</option>
   <option>csdn7</option>
   <option>csdn8</option>
   <option>csdn9</option>
   <option>csdn10</option>
   <option>csdn11</option>
   <option>csdn12</option>
   <option>csdn13</option>
   <option>csdn14</option>
</sclect>

解决方案 »

  1.   


    <span style="border:0px solid green; position:absolute; overflow:hidden"><select style="margin:-2px"> 
    <option>1111</option> 
    <option>11111111111111</option> 
    <option>111111111</option> 
    </select></span> 
      

  2.   


    <select   name=select>   
      <option   value=1>1</option>   
      <option   value=2>2</option>   
      </select>   
      设置1   
      <input   type=button   value=set   onclick=document.all("select").options[0].selected=true;>   
      <input   type=button   value=set   onclick=document.all("select").selectedIndex=0;>   
      <input   type=button   value=set   onclick=document.all("select").value=1>   
      设置2   
      <input   type=button   value=set   onclick=document.all("select").options[1].selected=true;>   
      <input   type=button   value=set   onclick=document.all("select").selectedIndex=1;>   
      <input   type=button   value=set   onclick=document.all("select").value=2>和这个差不多!
      

  3.   


    <select onmouseover='if(this.value!="")window.open(this.value)' class="textinput">    <option selected>主办单位</option>    <option>-----------------</option>    <option value="http://www.bjd.com.cn/">北京日报</option>    <option value="http://www.ben.com.cn/">北京晚报</option></select>
      

  4.   

    顶啊,我正好也需要
    http://topic.csdn.net/u/20080529/11/0ca92616-82e1-4624-a215-5f3afc6f832f.html?seed=1814420166
      

  5.   

    about the first question: the 2nd floor.about the second question: 
    You can't.
    <select> objects are handled by the OS (Windows, Unix, Linux, MacOS etc.), not by the browser. When a <select> object gains focus it passes control to the OS. The OS then returns control if it loses focus, or an option is selected. Whilst the OS has control, the browser knows nothing about where the mouse is, or what selections are being hilighted.
    [This is why an onchange event won't fire if the user scrolls through all the options but returns to the originally selected one. The OS simply reports back to the browser 'no change'.]IE supports the following events for the <option> element:onlosecapture onpropertychange onreadystatechange onselectstart
    As you can see, there's no onmouseover or onmouseout.you can use the div instead as the 3rd floor.
      

  6.   

    <div id="chatlog" style="border:1px solid black; padding:5px;height:115px;overflow:auto;" >
    <input type="text" value="aofei1"><br>
    <input type="text" value="aofei2"><br>
    <input type="text" value="aofei3"><br>
    <input type="text" value="aofei4"><br>
    <input type="text" value="aofei5"><br>
    <input type="text" value="aofei6"><br>
    <input type="text" value="aofei7"><br>
    <input type="text" value="aofei8"><br>
    <input type="text" value="aofei9"><br>
    </div>use this, you can catch the keyboard event, the scroll bar, and use custom css as you like.
    i'm work on a server now, it doesn't has a chinese input method. and i'm sorry of lacking ability of english.