Element: getAttributeNodeNS() メソッド

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 your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

指定された名前空間と名前を持つ属性の Attr ノードを返します。

構文

js
getAttributeNodeNS(namespace, nodeName)

引数

  • namespace は属性の名前空間を特定する文字列です。
  • nodeName は属性の名前を指定する文字列です。

返値

指定された属性のノードです。

メモ

getAttributeNodeNSgetAttributeNode よりも、特定の名前空間に含まれる属性を特定することができる点でより具体的です。対応するセッターメソッドは setAttributeNodeNS です。

仕様書

Specification
DOM
# dom-element-getattributenodens

ブラウザーの互換性