Saturday, May 16, 2009

CHECK IF A VARIABLE IS AN INTEGER IN JAVASCRIPT

var myValue =9.8;
if(parseInt(myValue)== myValue)
alert('Integer');
else
alert('Not an integer');

No comments:

Post a Comment