The getNamedItem() method of the NamedNodeMap interface returns the Attr corresponding to the given name, or null if there is no corresponding attribute.


myAttr = attrs.getNamedItem(name)


  • name is the name of the desired attribute

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome ? Edge ? Firefox Full support 34IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android Full support 34Opera Android ? Safari iOS ? Samsung Internet Android ?


Full support  
Full support
Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

Contributors to this page: mdnwebdocs-bot, mfluehr, fscholz, teoli, rhoggSugarcrm
Last updated by: mdnwebdocs-bot,