1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ulタグ配下のliの数を取得

1
Posted at

はじめに

  • 簡単なJS実装のデバッグで確認のため

問題

  • 要素の数がどのくらいになるかわからなかった

解決

document.getElementsByTagName('ul')[0].children.length

終わりに

  • indexの部分を変えるとHTMLCollectionから他のulを選べる
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?