HTMLSelectElement: name プロパティ

Baseline Widely available

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

We'd love to hear more about your role and the company you work for
Please help us by answering a few questions.

nameHTMLSelectElement インターフェイスのプロパティで、この<select> 要素の名前を示します。これは、この要素の name 属性を反映します。

この要素の名前を表す文字列です。

js
const selectElement = document.querySelector("#planets");
console.log(`Element's name: ${selectElement.name}`);
selectElement.name = "galaxies"; // 要素の名前を設定または更新

仕様書

Specification
HTML
# dom-fe-name

ブラウザーの互換性

関連情報