I want use only one decimal and only number in input type.so i am using jquery but problem is he is taking more decimal?????
i want to like this:123.1245454
not to 12345.12245.4554
$('#edit-discount').keyup(function() {
var $th = $(this);
$th.val($th.val().replace(/[^0-9.]/g, function(str) {
$("#req-productdis").hide();
$("#alpha1").show();
return '';
}));
work around for finding more than one decimal dot in a field having decimal value. Cannot find the regression.
You can use the following code: