不是option 的value,就是显示在输入区域上面写着的内容,应该有办法的吧?。。

解决方案 »

  1.   

    是不是这个样子滴?
    <html>
    <body>
    <select id="s1" name="s1">
    <option selected>123</option>
    <option>456</option>
    </select>
    <br>
    <input type=button onclick="func1()" value="button">
    </body>
    <script language="javascript">
    function func1()
    {
    var nLen = document.all.s1.length;
    for (var i=0; i<nLen; i++)
    {
    if (document.all.s1.options[i].selected == true)
    {
    alert(document.all.s1.options[i].text);
    break;
    }
    }
    }
    </script>
    </html>
      

  2.   

    得,就是它了,HTML区问了几天没人理,本来想转过来然后青斑竹给揭帖的。
    20分全给楼上了。