Jquery判断子元素是否存在
<div id="x3">
    <ol>
    </ol>
</div>判断<ol>标签中是否有子元素<li>:
1) is(expr|obj|ele|fn):返回true/false
$('#x3 ol').is('li')
2) $('#x3').find('ol:has(li)').length==0
判断某个特定元素是否存在:
$('#id').length>0 存在
获取父元素下的第一个子元素:$("#id").children(":first");
相关推荐
  89423661    2011-11-18  
   pplxh    2016-01-04  
   83473469    2018-09-12  
   ParadiserD    2018-09-12  
   lylicai    2018-02-07  
   pplxh    2016-03-30  
   聆听蘭    2016-01-04  
   pplxh    2014-04-15  
   原為簡單    2013-11-06  
   82483564    2012-12-05  
   JeWangZhe    2012-11-17  
   LingPF    2019-06-21  
   88284453    2011-11-24  
   gxr    2018-07-16  
 本文实例讲述了JS与jQuery实现子窗口获取父窗口元素值的方法。分享给大家供大家参考,具体如下:。<input type="button" onclick="window.open" value="
  87374459    2017-04-17  
   82413161    2018-01-21