Content-Length: 192303 | pFad | http://developer.mozilla.org/ja/docs/Web/API/HTMLFormElement/length

HTMLFormElement: length プロパティ - Web API | MDN

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

HTMLFormElement: length プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

HTMLFormElement.length は読み取り専用のプロパティで、 <form> 要素に含まれるコントロールの数を返します。

フォームのコントロールの一覧には elements プロパティを使用してアクセスすることができます。

これは <form> 要素の子孫である要素、および form プロパティを使用してフォームのメンバーになった要素の両方が含まれます。

このプロパティで扱われる要素は、 <button>, <fieldset>, <input> (ただし、 "image" 型のものは、歴史的な理由によって除外されます)、<object>, <output>, <select>, <textarea> です。

数値です。

js
if (document.getElementById("form1").length > 1) {
  // 複数のフォームコントロールがある場合
}

仕様書

Specification
HTML
# dom-form-length-dev

ブラウザーの互換性









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://developer.mozilla.org/ja/docs/Web/API/HTMLFormElement/length

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy