Html 需要在Chrome中进行下拉选择

Html 需要在Chrome中进行下拉选择,html,google-chrome,Html,Google Chrome,在Firefox中,在下拉表单元素上使用“required”和“disabled”选项可以防止用户在没有从下拉列表中选择内容的情况下提交表单,但在Chrome中则不行。你能帮忙吗 <select id="topic" class="form-control" required="required"> <option disabled selected>select genre</option> <option>All gen

在Firefox中,在下拉表单元素上使用“required”和“disabled”选项可以防止用户在没有从下拉列表中选择内容的情况下提交表单,但在Chrome中则不行。你能帮忙吗

<select id="topic" class="form-control" required="required">
      <option disabled selected>select genre</option>
      <option>All genres (whatever works)</option>
      <option>boogers</option>
      <option>cheese</option>
      <option>dumplings</option>
</select>

选择类型
所有类型(任何作品)
鼻屎
奶酪
饺子
这可能有效

<option selected="true" disabled="disabled">select genre</option>
选择流派

src:

要使其正常工作,只需在默认选项中添加
value=“
。这个答案提供了一些关于这个问题的HTML5文档


它在chrome中确实适用于我。我使用的是37.0.2062.124 m-64位版本。我无法重新选择“选择流派”。嗯。也许我提供的信息不完整。问题是,如果我在没有选择选项的情况下跳过它,它允许我在完整表单中单击Submit按钮,并继续执行附加到Submit的操作。在Firefox中,它告诉我必须首先完成该字段,为此我将使用一些客户端验证(js)和服务器端验证(php)。也许firefox会自动做到这一点。是的,我正在使用Meteor(javascript),所以这就是我决定走的路线。谢谢