jquery判断对象是否存在

  1. if($("#abc").length >0) { ... }

  2. if($("#abc").html() != "") { ... }

原文地址:https://www.cnblogs.com/zhaogaojian/p/9254322.html