实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
AخA
 
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <title>
5
            Number Example 3
6
        </title>
7
        <script type="text/javascript">
8
            alert(NaN == NaN); //false
9
            alert(isNaN(NaN)); //true
10
            alert(isNaN(10)); //false 10 is a number
11
            alert(isNaN("10")); //false can be converted to number 10
12
            alert(isNaN("blue")); //true cannot be converted to a number
13
            alert(isNaN(true)); //false can be converted to number 1
14
        </script>
15
    </head>
16
    <body>
17
    </body>
18
</html>