【发布时间】:2016-07-19 03:49:55
【问题描述】:
我的表单中有 3 个输入字段,我想要用户使用键盘上的 tab 键按钮,允许用户跳转到下一个输入文本...
问题出在我的 google chrome 浏览器中,它使用 TAB 可以正常工作,但在使用 TAB 按钮的 mozilla 浏览器中,它不允许我跳转到另一个输入文本。
这是我完成的表格。尝试添加 tabindex 但在 mozilla 中不起作用。
<form class="form-style col-lg-2 col-md-2 col-sm-2 col-xs-12 text-center">
<div class="form-group">
<input tabindex="1" type="text" class="form-control input-xxlarge" id="data1" onkeypress='return event.charCode >= 48 && event.charCode <= 57' maxlength="2" placeholder="How would you rate yourself, on a scale of 1-12?">
</div>
<div class="form-group">
<input tabindex="2" type="text" class="form-control input-xxlarge" id="data2" onkeypress='return event.charCode >= 48 && event.charCode <= 57' maxlength="2" placeholder="What is your ideal goal, on a scale of 1-12?">
</div>
<div class="form-group">
<textarea tabindex="3" class="form-control input-xxlarge" id="comment" placeholder="Improvement ideas"></textarea>
<style type="text/css">
textarea {
resize: none;
min-height: 100px;
max-height: 200px;
}
</style>
</div>
<input tabindex="4" type="submit" class="btn btn-success btn-large" value="NEXT" disabled="disabled">
</form>
谢谢...
【问题讨论】:
标签: html