Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
namedItem() は HTMLCollection インターフェイスのメソッドで、この集合の中で id または name 属性が指定された名前に一致する Element の先頭のものを返します。一致する要素がなければ null を返します。
JavaScript では、配列のブラケット記法を文字列で collection["value"] のように使用すると、collection.namedItem("value") と同等になります。
| DOM # dom-htmlcollection-nameditem-key |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年7月13日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.