1.作用

isNaN() 函数用于检查其参数是否是非数字值。

2.JS

<script>

document.write(isNaN(123));
document.write(isNaN(-1.23));
document.write(isNaN(5-2));
document.write(isNaN(0));
document.write(isNaN("Hello"));
document.write(isNaN("2005/12/12")); </script>
false
false
false
false
true
true
05-11 17:30