<from name="frm">
<select name="a1" onchange="selFun()">
<option value="1">a</option>
<option value="2">b</option>
<option value="3">c</option>
</select>
</form>
<script>
function selFun(){
t1=document.frm.a1.options[document.frm.al.selectedIndex].text
h1=document.frm.a1.options[document.frm.al.selectedIndex].value
}
t1是显示的文本
h1是文本对应的值

解决方案 »

  1.   

    <body>
    <select id=s size="5" multiple>
    <option value="a">a
      <option value="b">b</option>
      <option value="v">v</option>
    <option value="c">c</option>
    </select><input type=submit onclick="for(i=0;i<s.options.length;i++)if(s.options[i].selected)alert(s.options[i].value)">
    </body>
    formName.selectName.options[formName.selectName.selectedIndex].value值
    formName.selectName.options[formName.selectName.selectedIndex].text显示的文本
      

  2.   

    alert(formname.selectname.options[formName.selectName.selectedIndex].text)
    这个是选中项的文字
      

  3.   

    谢谢各位,等下就给分,还有一个问题:
    如果没有选中任何项呢?
    是不是selectName.selectedIndex==-1呢?
      

  4.   

    一般情况下加一行
    <option value="-1">请选择</option>
    然后判断是否选中这行就可以了