<div class="input_wrap mul_wrap flex">
<input type="tel" maxlength="1" autocomplete="off" class="flex_item accuracy_input" value="1"
disabled>
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position1"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position2"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position3"
class="flex_item accuracy_input active2">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position4"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position5"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position6"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position7"
class="flex_item accuracy_input active2">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position8"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position9"
class="flex_item accuracy_input">
<input type="tel" maxlength="1" autocomplete="off" v-model="search_EQ_position10"
class="flex_item accuracy_input">
</div>``
.accuracy_input,
.flex_item {
border: 1px solid rgba(229, 76, 63, .26) !important;
border-radius: .533vw !important;
color: #403f3f !important;
font-size: 5.333vw !important;
height: 7.733vw !important;
line-height: 7.733vw !important;
text-align: center !important;
width: 7% !important;
outline: none;
background-color: #fff;
}
.input_wrap {
display: flex;
justify-content: space-between;
padding: 0 0.3125rem;
}
.active2 {
margin-right: 5px;
}
(function () {
$('.accuracy_input').on('input propertychange', function () {
var me = $(this);
if (me.val() !== '') {
me.next('.accuracy_input').focus();
} else {
me.prev('.accuracy_input').focus();
}
}).on('focus', function () {
//聚焦时强制光标位于值后面
var me = $(this);
if (me.val() && me[0].setSelectionRange) {
me[0].setSelectionRange(1, 1);
}
});
document.onkeydown = function (e) {
if (e.keyCode == 8 ) {
$('.accuracy_input').each(function () {
var me = $(this);
if (me.is(':focus') && !me.val()) {
me.prev('.accuracy_input').focus();
}
});
}
}
})();