NamedNodeMap.getNamedItem()
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.
NamedNodeMap
接口的 NamedNodeMap.getNamedItem()
方法返回对应给定名称的属性
,如果没有对应名称的属性则返回 null
语法
myAttr = attrs.getNamedItem(name)
参数
name
是期望获取的属性名
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
getNamedItem |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.