HTMLSelectElement: name プロパティ - Web API | MDN

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

js

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

仕様書

Specification
HTML
# dom-fe-name

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.