このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
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月.
name は HTMLButtonElement インターフェイスのプロパティで、この <button> 要素の名前を示します。これは、この要素の name 属性を反映します。
値
この要素の名前を表す文字列です。
例
js
const buttonElement = document.querySelector("#myButton");
console.log(`Element's name: ${buttonElement.name}`);
buttonElement.name = "newName";
仕様書
| Specification |
|---|
| HTML> # dom-fe-name> |
ブラウザーの互換性
Loading...