我有一个使用html select标签设计的下拉列表。事情是它的工作正常,而不是在mozilla,歌剧和谷歌铬工作...可以任何人帮助..使用的代码是
<select name="select nav" size="1" style="background-color:#FFFFFF" onChange="location.href=options[selectedIndex].value;">
<option value="locations_aberdeen.html">Aberdeen
<option value="locations_arendal.html" selected>Arendal
<option value="locations_athens.html">Athens
<option value="locations_bangkok.html">Bangkok
<option value="locations_beijing.html">Beijing
<option value="locations_capetown.html">Capetown
<option value="locations_dubai.html">Dubai
<option value="locations_durban.html">Durban
<option value="locations_genoa.html">Genoa
<option value="locations_gsc.html">Global Support Centre
<option value="locations_hochiminh.html">Ho Chi Minh City
<option value="locations_hong-kong.html">Hong Kong
<option value="locations_houston.html">Houston
<option value="locations_jakarta.html">Jakarta
<option value="locations_kuala-lumpur.html">KualaLumpur
<option value="locations_limassol.html">Limassol
<option value="locations_london.html">London
<option value="locations_lowestoft.html">Lowestoft
<option value="locations_manila.html">Manila
<option value="locations_miami.html">Miami
<option value="locations_moscow.html">Moscow
<option value="locations_mumbai.html">Mumbai
<option value="locations_new-delhi.html">New Delhi
<option value="locations_niteroi.html">Niteroi
<option value="locations_oslo.html">Oslo
<option value="locations_perth.html">Perth
<option value="locations_riga.html">Riga
<option value="locations_shanghai.html">Shanghai
<option value="locations_singapore.html">Singapore
<option value="locations_southampton.html">Southampton
<option value="locations_tokyo.html">Tokyo
<option value="locations_vancouver.html">Vancouver
</select>
答案 0 :(得分:0)
似乎在firefox 3.6.10中为我工作
答案 1 :(得分:0)
这可能会更好:
onchange="window.location.href = this.value;"
此外,关闭所有选项标签以获得更好的HTML,某些浏览器可能不喜欢它。