Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ul があり、特定の li 内部 HTML を取得する必要があります。
以前に提供した数値変数があります。
その番号を使用して、li 内部 HTML を取得するにはどうすればよいですか。
tnx
ULを取得してから、そのchildren[]プロパティにアクセスします。これはNodeList(基本的には配列に似ていますが、ノードを保持するように調整されています)なので、そこに番号を入力して、対応するリスト項目を取得できます。
children[]