What's the best method to mask an input field to only allow float/double, without any jquery plugin.
Acutally i'm doing it like this:
$("#defaultvalue").bind("keypress", function(e) {
if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
return false;
}
});
but thats only for numbers thx
I guess you could drop the parseFloat and just use the regex.
In HTML page just call JS SetFloatEntry Method.
Example:
Put this on your JS refered file:
JavaScripts parseFloat() function returns NaN, when your input is not a number. For i18n you will probably have to replace the floating point separator (e.g. , with .)