수기등록 화면 enter key -> 다음 요소 선택

master
mjkhan21 6 months ago
parent 83f6d3526a
commit 9c1e1d21b4

@ -42,7 +42,7 @@
</label>
<input type="text" is="id-input" name="crdnTm" data-map="CRDN_TM"
class="form-control form-time" data-fmt-type="time" maxlength="8" required
placeholder="시:분:초" />
placeholder="시:분:초" autofocus />
</div>
<div class="col-md-4">
<label is="name-label" for="vhrno"
@ -726,6 +726,19 @@ $(document).ready(function(){
fn_securityModeToggle($("#securityMode--top").is(":checked"));
ctrl.dataset.append({});
let inputs = document.querySelectorAll("form[name='frmEdit'] select:not([disabled]), form[name='frmEdit'] input[type='text']:not([readonly]):not([disabled])");
inputs.forEach((input, index) => {
input.addEventListener('keydown', evt => {
if (evt.key !== 'Enter') return;
evt.preventDefault();
let next = inputs[index < 8 ? index + 1 : 2];
if (next)
next.focus();
});
});
});
//# sourceURL=crdn05030-info.jsp

Loading…
Cancel
Save