<select id="select1" onchange="liu()"><opion>tt</opion></select>
<script>
function liu(){
var o = document.getElementById("select1");
if(o.selected.value==tt){
window.location.href="xxx.htm";
}
}

解决方案 »

  1.   

    <select id=sel name=sel>
    <option value="http://www.163.com">
    <option value="http://www.sina.com.cn">
    </select>
    <input type=button onclick="window.location.href=document.all.sel.value;">
      

  2.   

    <select id="select1" onchange="liu()">
    <opion>tt</opion>
    <opion>tt</opion>
    <opion>tt</opion>
    <opion>tt</opion>
    </select>
    <script>
    function liu(){
    var o = document.getElementById("select1");
    if(o.selected.value==tt){
    window.location.href="http://www.csdn.net";
    }
    }
    </script>这样吗,不行呀
      

  3.   

    请问怎样得到option中value的值呀,谢谢