tags:

views:

79

answers:

3

How to make the Textbox field accept only Decimal Values

A: 

Maybe you can bind a validate function on the text field?

Safrain
+2  A: 

Can use... http://www.texotela.co.uk/code/jquery/numeric/

kekekela
A: 

Hi, Try this:

        function is_int(test) 
            typeof (a = (typeof test == "function" ? test() : test)) == "number" ? !(a % 1) : false;



returns:

is_int(8) // true

is_int("8") // false

function test() {   
        return 12
}

is_int(test()) // true
Jet