I have to restrict a input field to accept only numbers. We are not using "lightning-input". How to use below js function in Lightning web component?
function isNumber(evt) {
var iKeyCode = (evt.which) ? evt.which : evt.keyCode
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57))
return false;
return true; }
