Sunday, May 25, 2008

判断x是否被定义

if(x==null) or if(typeof(x)=="undefined")
最简单的写法 if(!x)

No comments: