だから私はこのように設計されたウェブサイトで働いています:
<h2>
<span id="Explanation"> Explanation </span>
</h2>
<table> ... don't select anything in this table </table>
<a href="https://www.google.com/">hey</a>
<p> What's up? </p>
<p> How's life? </p>
<h2>
<span id="Transcript"> Transcript </span>
</h2>
<p> Don't select this </p>
説明ヘッダーとトランスクリプト ヘッダーの間のすべてを jQuery を使用して選択したいのですが、テキストをまったく取得できません。これを取得するための現在のjQueryは次のとおりです。
explanation = "";
explanation = $("h2 #Explanation").nextUntil("h2 #Transcript").text();
しかし、今のところ、私はテキストをまったく選択していません。また、表のテキストではなく a と p のテキストのみを取得する方法もわかりません。皆さんが私に与えることができるどんな助けも大歓迎です、ありがとう!