当前位置: 首页 > 网络学院 > 客户端脚本教程 > JavaScript > JavaScript isNaN() 方法
The isNaN() function is used to check if a value is not a number.
isNaN()方法用于判断一个值是否为非数字类型。
isNaN(number) |
Parameter 参数 | Description 注释 |
---|---|
number 数字 | Required. The value to be tested 必选项。所要测试的值 |
In this example we use isNaN() to check some values:
在下面的例子中,我们将用isNaN()来检查一些值:
<script type="text/javascript"> document.write(isNaN(123)+ "<br />") </script> |
The output of the code above will be:
输出结果为:
false |
isNaN()
How to use isNaN().
如何应用isNaN()
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
吃惊 | 欠揍 | 支持 | 很棒 | 一般 | 搞笑 | 扯淡 | 不解 |