Hussy Hussy - 6 months ago 5x
Javascript Question

How to check whether a value is a number in javascript or jquery

Possible Duplicate:

Validate numbers in JavaScript - IsNumeric()

var miscCharge = $("#miscCharge").val();

I want to check misCharge is number or not? is there any method or easy way in jquery or javascript to do this?

HTMl is

<g:textField name="miscCharge" id ="miscCharge" value="" size="9" max="100000000000" min="0" />

zad zad
function isNumber(n) {
  return !isNaN(parseFloat(n)) && isFinite(n);