//方法一 if($('.div1').length==0){ alert('不存在'); }else{ alert('存在'); } //方法二 if($('.div')){ alert('存在'); }else{ alert('不存在'); }