javascript当中isNaN用法

2)isNaN                    
例 4.2.1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>  
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
/*favo说isNaN是Global的方法, 而不是window的方法*/
    var b1 = window.isNaN("25");
    var b2 = isNaN("abc");
    document.write("b1="+b1+",b2="+b2)
//-->
</SCRIPT>
</BODY>
</HTML>

更多内容请见原文,文章转载自:https://blog.csdn.net/qq_43650923/article/details/102235052

posted @ 2021-11-12 22:34  malala  阅读(89)  评论(0编辑  收藏  举报