Prevent non-numeric input in contesting-serial fields

这个提交包含在:
Peter Goodhall 2024-04-02 13:45:00 +01:00 提交者 GitHub
当前提交 55d24cd52b
找不到此签名对应的密钥
GPG 密钥 ID: B5690EEEBB952194

查看文件

@ -88,10 +88,10 @@ $(function () {
});
});
// We don't want spaces to be written in serial
// We don't want anything but numbers to be written in serial
$(function () {
$('#exch_serial_r').on('keypress', function (e) {
if (e.which == 32) {
$('#exch_serial_r, #exch_serial_s').on('keypress', function (e) {
if (e.key.charCodeAt(0) < 48 || e.key.charCodeAt(0) > 57) {
return false;
}
});