script http://www.kunalbabre.com/jQueryLibrary/index.php:
$('input[numeric]').keyup(function() {
var d = $(this).attr('numeric');
var value = $(this).val();
var orignalValue = value;
value = value.replace(/[0-9]*/g, "");
var msg = "Only Integer Values allowed.";
if (d == 'decimal') {
value = value.replace(/\./, "");
msg = "Only Numeric Values allowed.";
}
if (value != '') {
orignalValue = orignalValue.replace(/([^0-9].*)/g, "")
$(this).val(orignalValue);
$(this).after('<span style="margin-left:5px;color:red;position:absolute;">' + msg + '</span>');
} else {
$(this).next('span').remove();
}
});
, , "," "100 000,00". "100". "", .
: , reg ex, .: (
? ?