JQuery------判断拥有某个class或id的div是否存在 if ($(".Btn,#Show").length > 0) { alert("存在"); } else { alert("不存在"); }