Always Accept Integer Values
ASP.NET
4
Posts
3
Posters
0
Views
1
Watching
-
Well, If I get you correctly; you are interested in having a textbox which only accepts integer values. Am I rite? If so, you can use the following code. Hi, this following code allows only integers.
function intOnly(i) { if(i.value.length>0) { i.value = i.value.replace(/[^\d]+/g, ''); } }
-
Well, If I get you correctly; you are interested in having a textbox which only accepts integer values. Am I rite? If so, you can use the following code. Hi, this following code allows only integers.
function intOnly(i) { if(i.value.length>0) { i.value = i.value.replace(/[^\d]+/g, ''); } }