在js中判断值是否为空
可以用以下方式进行判断
一 if(value==undefined){
...
}
二 if(typeof(value)=="undefined")
{
。。。
}
其中以上当值为null时 和值为undefined得到的结果是一致的
在js中判断值是否为空
可以用以下方式进行判断
一 if(value==undefined){
...
}
二 if(typeof(value)=="undefined")
{
。。。
}
其中以上当值为null时 和值为undefined得到的结果是一致的