← 返回首页
HTMLButtonElement: name プロパティ - Web API | MDN

このページはコミュニティーの尽力で英語から翻訳されました。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 属性を反映します。

In this article

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

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

仕様書

Specification
HTML
# dom-button-name

ブラウザーの互換性

Enable JavaScript to view this browser compatibility table.

関連情報