JS案例:isNaN()函数应用示例

来自CloudWiki
跳转至: 导航搜索
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>内置函数测试示例</title>
</head>
<body>
<pre>
<script type="text/javascript">
		document.writeln(isNaN(123));
		document.writeln(isNaN(123.45));
		document.writeln(isNaN(-123));
		document.writeln(isNaN(123+123));
		document.writeln(isNaN("1234"));
		document.writeln(isNaN("hello"));
		document.writeln(isNaN("2018/2/28"));
</script>
</pre></body></html>