var 获取一个值 if 没有值 alert if(! a){ alert("没有值"); } 转载于:https://www.cnblogs.com/fangyangwa11/p/5917264.html