js中判断var 是否为空 //考点 var bpkd = $('#bpkd').val(); 我要判断,bpkd是否为空 其中一种方法为 if(bpkd.trim().length == 0){ confirm("考点不能为空"); }