前端判断数据类型为null
var type = null
//判断
if(!type && typeof type != "undefined" && type != 0){
//console.log("数据为null");
}else{
//console.log("不为null的数据");
}
var type = null
//判断
if(!type && typeof type != "undefined" && type != 0){
//console.log("数据为null");
}else{
//console.log("不为null的数据");
}