开发者

HTML Select Option not recognized when tab and arrows used to select option

开发者 https://www.devze.com 2022-12-19 19:12 出处:网络
This is an odd problem and likely a rookie mistake. For some odd reason, if I use the arrow keys to select a select option from below, it fails to submit unless I deselect by clicking somewhere else o

This is an odd problem and likely a rookie mistake. For some odd reason, if I use the arrow keys to select a select option from below, it fails to submit unless I deselect by clicking somewhere else on the page. If I keep focus on the select option, the submission will fail to recognize the value. Am I committing some stupid mistake?

<select id="name" class="state">
    <option value="">
        Select
    </option>

    <option value="Alan">
        Alan
    </option>

    <option value="Brad">
        Brad
    </option>

    <option value="Carol">
        Carol
    </option>

    <option value="Derrick">
        Derrick
开发者_C百科    </option>
</select>


No. This is not a problem and is supposed to happen this way.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号