在js中判斷值是否爲空
可以用以下方式進行判斷
一 if(value==undefined){
...
}
二 if(typeof(value)=="undefined")
{
。。。
}
其中以上當值爲null時 和值爲undefined得到的結果是一致的
在js中判斷值是否爲空
可以用以下方式進行判斷
一 if(value==undefined){
...
}
二 if(typeof(value)=="undefined")
{
。。。
}
其中以上當值爲null時 和值爲undefined得到的結果是一致的