null,对象不存在
var ii= document.getElementById("id");
alert(ii);
当前页面不存在id对象

   undefined
   var i;
alert(i);
  声明的变量没有初始化
   alert(document.oiji);
   或者对象属性,方法不存在

   空
   <asp:TextBox ID="name" runat="server" Width="100px" Text=""></asp:TextBox>
var iab = document.getElementById("name").value;
alert(iab);
   id=name的值为空

以上就是【js null undefined 空区别说明】的全部内容了,欢迎留言评论进行交流!

赞(0) 踩(0)
发表我的评论

最新评论

  1. 暂无评论