There's no isNumeric()
type of function, but you could add your own:
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
NOTE: Since parseInt()
is not a proper way to check for numeric it should NOT be used.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…