jquery 检测元素是否存在的实例代码


if ($('#myDiv).length) { 
    // your code 
}

 Simple, but not obvious.


« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3