手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >js null undefined 空区别说明
js null undefined 空区别说明
摘要:null,对象不存在varii=document.getElementById("id");alert(ii);当前页面不存在id对象und...

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 空区别说明】相关文章:

JavaScript中的toUTCString()方法使用详解

Javascript中的Prototype到底是什么

JQuery插件jcarousellite的参数中文说明

AngularJS学习笔记之ng-options指令

浅谈javascript中for in 和 for each in的区别

jQuery实现div随意拖动的实例代码(通用代码)

prototype 的说明 js类

由ReactJS的Hello world说开来

AspNet中使用JQuery上传插件Uploadify详解

TypeError document.getElementById(...) is null错误原因

精品推荐
分类导航