1.判断id/ class 是否存在?
<script> $(function(){ if(("#id_name").length()>0){ //如果id 存在 } }) </script>
jquery/js 元素操作
原文:https://www.cnblogs.com/lixiuming521125/p/9744983.html