isNaN
数値かどうかを調べる
構文
isNaN(number)
引数
number=数値例文
<html> <head> <title>isNaN</title> </head> <body> <!--数値かどうかを調べるのサンプル--> <script type="text/javascript"> document.write(isNaN(123)+"<br>"); document.write(isNaN(-1.23)+"<br>"); document.write(isNaN(5-2)+"<br>"); document.write(isNaN(0)+"<br>"); document.write(isNaN("Hello")+"<br>"); document.write(isNaN("2005/12/12")+"<br>"); </script> </body> </html>
関連記事
- Number.toPrecision
- Number.toFixed
- Number.toExponential
- Number.prototype
- Number.NaN
- Number.toString
- Number.POSITIVE_INFINITY
- Number.NEGATIVE_INFINITY
- Number.MIN_VALUE
- Number.MAX_VALUE
スポンサーリンク