jquery 检测元素是否存在的实例代码 if ($( myDiv) length) { your code } Simple, but not obvious JavaScript 2022-04-09 215 点赞 3 评论 325 浏览