js里面这三种东西总是让人疑惑,特此整理一下

        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的值为空

 

 

相关文章:

  • 2021-09-01
  • 2021-12-20
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
猜你喜欢
  • 2021-04-26
  • 2021-11-27
  • 2021-09-24
  • 2022-12-23
  • 2021-08-03
  • 2021-12-25
相关资源
相似解决方案