【发布时间】:2020-06-22 07:52:07
【问题描述】:
我在 html 中有这样的东西:
<p class ="aa">Something<p>
<p class ="bb">Another thing<p>
<p class ="cc">Something else<p>
<p class ="aa">Things are coming<p>
<p class ="dd">Too much things<p>
<p class ="ee">Neverending things<p>
<p class ="aa">Best thing ever<p>
我想选择并存储在一个变量中,每个标签之间的两个标签都带有“aa”类。 (目标是将每个结果存储在 JSON 文件中) 如何继续使用香草 JS 或 Jquery? 感谢您的回复。
【问题讨论】:
-
当您标记 jQuery 时,请研究
nextUntil()方法。
标签: javascript jquery html json dom