abrechenbarkeit/script.js
2024-11-03 21:22:51 +01:00

10 lines
345 B
JavaScript

/// <reference lib="dom" />
document.addEventListener("keypress", ev => {
if (!(document.activeElement instanceof HTMLInputElement)) {
if (ev.code.startsWith("Digit"))
document.forms.buy_product.pcode.value += ev.code.substring(5)
if (ev.code == "Enter")
document.forms.buy_product.submit()
}
})