Hi Dear ,
jQuery isNaN() Function Example
A NaN, which means "Not-a-Number", The classic example of a NaN is zero divided by zero, 0/0.
w3schools say : The isNaN() method determines whether a value is an illegal number or not a number .
This function return true or false . If the value is NaN return true AND false if not .
Syntax :
isNaN(value)
Tips : Required value to be test .
Example :
console.log(isNaN(123)) => False
console.log(isNaN("hi")) => True
Removed Features isNaN method in jQuery 1.7 :
jQuery.isNaN(): This undocumented utility function has been removed. It was confusing because it appropriated the name of a built-in JavaScript function but did not have the same semantics. The new jQuery.isNumeric() serves a similar purpose, but has the benefit of being documented and supported. Despite jQuery.isNaN() being undocumented, several projects on Github were using it. We have contacted them and asked that they use jQuery.isNumeric() or some other solution.
Refrence : http://blog.jquery.com/2011/11/03/jquery-1-7-released/
No comments:
Post a Comment