首页 > 其他 > 详细

变量未定义,或者定义为赋值的情况下 都会是undifine

时间:2015-07-29 15:44:30      阅读:129      评论:0      收藏:0      [点我收藏+]
 1 <!DOCTYPE HTML>
 2 <html>
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 5 <title>无标题文档</title>
 6 </head>
 7 
 8 <body>
 9     <script>
10         //真 假
11         var n;
12         alert(typeof(n))
13         if(n){
14             alert(真的)    
15         }else{
16             alert(假的)
17         }
18     </script>
19 </body>
20 </html>

 

变量未定义,或者定义为赋值的情况下 都会是undifine

原文:http://www.cnblogs.com/zhangjingyun/p/4685915.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!