簡體   English   中英

全選 <table> 具有的標簽 <input> 和 <section> 它們中的標簽

[英]select all <table> tags that has <input> and <section> tags in them

如何通過jQuery選擇所有具有<input><section>標記的<table>標記?

就像是:

var tables_with_input = $( "table" that_contain input,section)  ///pseudo code

您可以使用:has ,它檢查匹配的元素是否包含某些元素等。

$('table:has(input, section)')

小提琴

var tables_with_input = $(context).find('table').has('input');

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM