here is my code .
this is only for integer, so only integer is valid.
Let say I want to make it valid for values such as
1.5,
1.0,
0.5.
I think that bold part should we change.It is any possible solution?
$(document).ready(function () {
$('input[numeric]').keyup(function () {
var d = $(this).attr('numeric');
var val = $(this).val();
var orignalValue = val;
val = val.replace<strong>(/([^0-9].*)/g, "");</strong>
var msg = "Only Integer Values allowed.";
if (val != '') {
orignalValue = orignalValue.replace(/(^[0-9]*$)/g, "")
$(this).val(orignalValue);
$.fx.speeds._default = 1000;
$(function () {
$("#dialog").dialog
({
autoOpen: true,
show: "blind",
hide: "explode"
});
});
}
});
});