之類的,我有以下要素:檢查元素包含任何來自陣列
<div class="one two three four five six seven eight"></div>
<div class="one two three four five six seven eight ten"></div>
<div class="one two three four five six seven eight"></div>
<div class="one two three four five six seven eight"></div>
<div class="one two three four five six seven eight eleven"></div>
<div class="one two three four five six seven eight nine"></div>
而下面的JS:
var obj = ['nine', 'ten', 'eleven'];
如何檢查是否有這些元素有一個數組中的類?
笛卡爾檢查!哇! ':P' –
你是什麼意思的「檢查」?你只想選擇數組中包含類的所有div嗎? – alan0xd7
如果你真的認爲檢查然後https://api.jquery.com/hasclass/將被用於這樣的地方 – Huangism