select实现选中跳转

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了select实现选中跳转相关的知识,希望对你有一定的参考价值。

<script type="text/javascript">
    function mbar(sobj) {
        var docurl = sobj.options[sobj.selectedIndex].value;
        if (docurl != "") {
            open(docurl, _blank);
            sobj.selectedIndex = 0;
            sobj.blur();
        }
    }
 </script>
<select onchange=mbar(this) style=" background: 

transparent;width:50%;padding:1px;font-size: 14px;border: 1px solid transparent;height:34px;-

webkit-appearance: none; /*for chrome*/ color:#595757;appearance:none;-moz-

appearance:none; /* Firefox */
-webkit-appearance:none; /* Safari 和 Chrome */">                
                  <option value="http://c.zbanju.com">瑞丰苑</option>
                  <option value="http://e.zbanju.com">选择</option>
                  <option value="http://d.zbanju.com">瑞丰苑1</option>
                  <option value="http://b.zbanju.com">瑞丰苑2</option>
              </select>

 

以上是关于select实现选中跳转的主要内容,如果未能解决你的问题,请参考以下文章