I want to allow only numeric values to be entered into the text and if user enters alphabetic character it should warn the user. Any suggestion for optimized and short javas
// Solution to enter only numeric value in text box
$('#num_of_emp').keyup(function () { this.value = this.value.replace(/[^0-9.]/g,''); });
for an input box such as :