My HTML Code is
<input type="text" class="form-control textinput" id="Result" name="Result" value="@p.Result"/>
My JQuery Code is :
$(function () {
$(".textinput").keydown(function (e) {
var test = ^(\d?\d?\d(,\d\d\d)*|\d+)(\.\d\d)?$;
var value = String.fromCharCode(e.keyCode);
if (value.match(test)) {
return false;
}
});
});
I have reffered to This Question but it isn't working,showing an error so please help
My Sample Inputs will be as follows
1,245.30
24,235
135.60,12.6
235.50
34