Chrome错误或<select> </select>上的错误

时间:2014-04-25 08:11:02

标签: html google-chrome

我的客户在Chrome中提出了一个奇怪的错误,他创建了一个选项,其选项会在选择法国部门时发生变化。我尝试了很多东西,我发现它也发生在一个只有select中的原始html文件中。我已经想通了,当我删除我的评论之间的选项时,选择行为正常,如果我让它们站起来你会看到它看起来像某种多选框。欢迎提出所有建议或解决方案,因为我无法找出问题所在。

这是HTML

<select name="bezienswaardigheid" id="bezienswaardigheid">
<option value="0" d="d0" s="0" style="display: none;">Geen voorkeur</option>
<option value="1" s="s6" d="d16" style="display: inline;">Baai van de Somme (natuurreservaat)</option>
<option value="2" s="s6" d="d9" style="display: none;">Boulogne sur Mer (levendige vissersstad)</option>
<option value="3" s="s1" d="d2" style="display: none;">Côte de Granit Rose (rode rotskust)</option>
<option value="14" s="s6" d="d9" style="display: none;">Cap Griz Nez (krijtrotsen)</option>
<option value="34" s="s1" d="d8" style="display: none;">Carnac (prehistorische monumenten)</option>
<option value="12" s="s4" d="d3" style="display: none;">D-Day invasiestranden</option>
<option value="4" s="s4" d="d3" style="display: none;">Deauville (mondaine badplaats)</option>
<!-- BUG OR FAULT STARTS HERE -->
<option value="5" s="s4" d="d10" style="display: none;">Dieppe (historische badplaats)</option>
<option value="6" s="s1" d="d6" style="display: none;">Dinard (oude vissersplaats)</option>
<option value="15" s="s4" d="d10" style="display: none;">Etretat (krijtrotsen)</option>
<option value="8" s="s4" d="d10" style="display: none;">Fécamp(historische badplaats)</option>
<option value="9" s="s4" d="d3" style="display: none;">Honfleur (artistiek stadje)</option>
<option value="11" s="s2" d="d1" style="display: none;">Ile d'Oléron (bekend schiereiland)</option>
<option value="10" s="s9" d="d13" style="display: none;">Ile de Noirmoutier (charmant schiereiland)</option>
<option value="28" s="s2" d="d1" style="display: none;">Ile de Ré (charmant eiland)</option>
<option value="31" s="s4" d="d7" style="display: none;">Invasiestranden (Manche)</option>
<option value="13" s="s4" d="d7" style="display: none;">Jersey en Guernsey (kanaaleilanden)</option>
<option value="33" s="s1" d="d5" style="display: none;">La pointe du Raz (indrukwekkende kaap)</option>
<option value="30" s="s2" d="d1" style="display: none;">La Rochelle (pittoreske havenstad)</option>
<option value="17" s="s6" d="d9" style="display: none;">Le Touquet (luxe badplaats)</option>
<option value="18" s="s9" d="d13" style="display: none;">Les Sables d'Olonne (bekende badplaats)</option>
<option value="29" s="s6" d="d15" style="display: none;">Lille (historische kunststad)</option>
<!-- BUG OR FAULT ENDS HERE -->
<option value="16" s="s1" d="d6" style="display: none;">Mont St. Michel (wereldbekende abdij)</option>
<option value="19" s="s9" d="d12" style="display: none;">Nantes (statige stad)</option>
<option value="20" s="s6" d="d9" style="display: none;">Opaalkust (kliffen en fijne zandstranden)</option>
<option value="21" s="s1" d="d2" style="display: none;">Perros Guirec (vogelreservaat)</option>
<option value="25" s="s1" d="d8" style="display: none;">Quiberon (prachtig schiereiland)</option>
<option value="32" s="s1" d="d5" style="display: none;">Roscoff (bekende badplaats)</option>
<option value="22" s="s4" d="d10" style="display: none;">Rouen (stad van Jeanne d'Arc)</option>
<option value="24" s="s6" d="d16" style="display: inline;">Saint Valéry sur Somme (middeleeuwse stad)</option>
<option value="23" s="s1" d="d6" style="display: inline;">St. Malo (zeeroversstad)</option>
<option value="26" s="s4" d="d4" style="display: none;">Tuinen van Monet (Giverny)</option>

1 个答案:

答案 0 :(得分:0)

这适用于Firefox,但在Chrome中是一个已知错误。

建议的解决方法是将选项包装在范围中以隐藏它。 查看此问题以获取一些示例代码: How to hide a <option> in a <select> menu with CSS?