创建http://jsfiddle.net/jWwPV/某种下拉菜单。
<div class="dropdown_navigation_general" style="float:left;" >
<select name="general_select" id="general_select" onchange="window.document.location.href=this.options[this.selectedIndex].value;" value="general">
<option selected>General</option>
<option value="http://www.google.com">Add transaction partner</option>
</select>
</div>
.dropdown_navigation_general {
margin:auto;
width:70px;
overflow:hidden;
}
.dropdown_navigation_general select {
background: transparent;
width: 100px;
padding: 0px;
font-size: 14px;
border: 0px solid #fff;
height: 19px;
-webkit-appearance: none;
}
当我点击Add transaction partner
时,在菜单顶部短暂而不是General
我看到Add transaction partner
。
点击菜单顶部的任何下拉菜单值后,我总是可以看到General
(所选值)。
答案 0 :(得分:1)
试试这个:
<select name="general_select" id="general_select"
onchange="window.document.location.href=this.options[this.selectedIndex].value;
this.value='general'">