1. 開発者向けのウェブ技術
  2. Web API
  3. HTMLButtonElement
  4. name

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

View in English Always switch to English

HTMLButtonElement: name プロパティ

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月⁩.

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

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

js
const buttonElement = document.querySelector("#myButton");
console.log(`Element's name: ${buttonElement.name}`);
buttonElement.name = "newName";

仕様書

Specification
HTML
# dom-fe-name

ブラウザーの互換性

関連情報

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /