健全性检查 - 我在表单中有一个选择标签,但无法使用 Tab 键访问它。我已经明确设置了选项卡索引,但没有帮助

发布于 2024-10-03 15:27:39 字数 4884 浏览 4 评论 0原文

这实际上很尴尬,但我似乎无法点击选择框,而且我已经尝试了我所知道的一切。

<form action="trial.php" method="post">

           <div class="formLeftCol">

             First Name:<br/>
   Last Name:<br/>
   Address:<br/>

   City:<br/>
   Select State <br/>
   Zip Code:<br/>
   Phone:<br/><br/>
   <p class="emailLabel">
   Email:</p><br/>


                </div>

                <div class="formRightCol"> 
                  <input class="formInput" type="text" name="first" />
                  <input class="formInput" type="text" name="last" />
                  <input class="formInput" type="text" name="address" />
                  <input class="formInput" type="text" name="city" />

                <select tabindex=1 class="formInput" name="state">
                    <option value="AL">Alabama</option>
                    <option value="AK">Alaska</option>

                    <option value="AZ">Arizona</option>
                    <option value="AR">Arkansas</option>
                    <option value="CA">California</option>
                    <option value="CO">Colorado</option>
                    <option value="CT">Connecticut</option>
                    <option value="DE">Delaware</option>

                    <option value="DC">District of Columbia</option>
                    <option value="FL">Florida</option>
                    <option value="GA">Georgia</option>
                    <option value="HI">Hawaii</option>
                    <option value="ID">Idaho</option>
                    <option value="IL">Illinois</option>

                    <option value="IN">Indiana</option>
                    <option value="IA">Iowa</option>
                    <option value="KS">Kansas</option>
                    <option value="KY">Kentucky</option>
                    <option value="LA">Louisiana</option>
                    <option value="ME">Maine</option>

                    <option value="MD">Maryland</option>
                    <option value="MA">Massachusetts</option>
                    <option value="MI">Michigan</option>
                    <option value="MN">Minnesota</option>
                    <option value="MS">Mississippi</option>
                    <option value="MO">Missouri</option>

                    <option value="MT">Montana</option>
                    <option value="NE">Nebraska</option>
                    <option value="NV">Nevada</option>
                    <option value="NH">New Hampshire</option>
                    <option value="NJ">New Jersey</option>
                    <option value="NM">New Mexico</option>

                    <option value="NY">New York</option>
                    <option value="NC">North Carolina</option>
                    <option value="ND">North Dakota</option>
                    <option value="OH">Ohio</option>
                    <option value="OK">Oklahoma</option>
                    <option value="OR">Oregon</option>

                    <option value="PA">Pennsylvania</option>
                    <option value="RI">Rhode Island</option>
                    <option value="SC">South Carolina</option>
                    <option value="SD">South Dakota</option>
                    <option value="TN">Tennessee</option>
                    <option value="TX">Texas</option>

                    <option value="UT">Utah</option>
                    <option value="VT">Vermont</option>
                    <option value="VA">Virginia</option>
                    <option value="WA">Washington</option>
                    <option value="WV">West Virginia</option>
                    <option value="WI">Wisconsin</option>

                    <option value="WY">Wyoming</option>
                </select>

                  <input class="formInput" type="text" name="zip" />
                  <input class="formInput" type="text" name="phone" />

                  <input class="formInputEmail" type="text" name="email" />
                  </div>


              <input class="formButton" type="image" src="images/trial/submitbutton.png" alt="Submit button">

              </form>

This is actually embarrassing, but I can't seem to tab to the select box and I've tried all I know to do.

<form action="trial.php" method="post">

           <div class="formLeftCol">

             First Name:<br/>
   Last Name:<br/>
   Address:<br/>

   City:<br/>
   Select State <br/>
   Zip Code:<br/>
   Phone:<br/><br/>
   <p class="emailLabel">
   Email:</p><br/>


                </div>

                <div class="formRightCol"> 
                  <input class="formInput" type="text" name="first" />
                  <input class="formInput" type="text" name="last" />
                  <input class="formInput" type="text" name="address" />
                  <input class="formInput" type="text" name="city" />

                <select tabindex=1 class="formInput" name="state">
                    <option value="AL">Alabama</option>
                    <option value="AK">Alaska</option>

                    <option value="AZ">Arizona</option>
                    <option value="AR">Arkansas</option>
                    <option value="CA">California</option>
                    <option value="CO">Colorado</option>
                    <option value="CT">Connecticut</option>
                    <option value="DE">Delaware</option>

                    <option value="DC">District of Columbia</option>
                    <option value="FL">Florida</option>
                    <option value="GA">Georgia</option>
                    <option value="HI">Hawaii</option>
                    <option value="ID">Idaho</option>
                    <option value="IL">Illinois</option>

                    <option value="IN">Indiana</option>
                    <option value="IA">Iowa</option>
                    <option value="KS">Kansas</option>
                    <option value="KY">Kentucky</option>
                    <option value="LA">Louisiana</option>
                    <option value="ME">Maine</option>

                    <option value="MD">Maryland</option>
                    <option value="MA">Massachusetts</option>
                    <option value="MI">Michigan</option>
                    <option value="MN">Minnesota</option>
                    <option value="MS">Mississippi</option>
                    <option value="MO">Missouri</option>

                    <option value="MT">Montana</option>
                    <option value="NE">Nebraska</option>
                    <option value="NV">Nevada</option>
                    <option value="NH">New Hampshire</option>
                    <option value="NJ">New Jersey</option>
                    <option value="NM">New Mexico</option>

                    <option value="NY">New York</option>
                    <option value="NC">North Carolina</option>
                    <option value="ND">North Dakota</option>
                    <option value="OH">Ohio</option>
                    <option value="OK">Oklahoma</option>
                    <option value="OR">Oregon</option>

                    <option value="PA">Pennsylvania</option>
                    <option value="RI">Rhode Island</option>
                    <option value="SC">South Carolina</option>
                    <option value="SD">South Dakota</option>
                    <option value="TN">Tennessee</option>
                    <option value="TX">Texas</option>

                    <option value="UT">Utah</option>
                    <option value="VT">Vermont</option>
                    <option value="VA">Virginia</option>
                    <option value="WA">Washington</option>
                    <option value="WV">West Virginia</option>
                    <option value="WI">Wisconsin</option>

                    <option value="WY">Wyoming</option>
                </select>

                  <input class="formInput" type="text" name="zip" />
                  <input class="formInput" type="text" name="phone" />

                  <input class="formInputEmail" type="text" name="email" />
                  </div>


              <input class="formButton" type="image" src="images/trial/submitbutton.png" alt="Submit button">

              </form>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

昇り龍 2024-10-10 15:27:39

要么只是从 select 元素中删除 tabindex 属性(因为其他输入元素没有该属性),或者也将其设置在所有其他输入元素上,并使用所需的值Tab 键顺序为 tabindex 值。

Either just remove the tabindex attribute from the select element (since other input elements doesn't have it), or set it on all other input elements as well, with the desired tabbing order as tabindex value.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文