hasAttributeNS method
Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise. HTML-only DOM implementations do not need to implement this method.
hasAttributeNS(namespaceURI, localName )
Parameters
String namespaceURI
The namespace URI of the attribute to look for.
String localName
The local name of the attribute to look for.
Returns
trueboolean. if an attribute with the given local name and namespace URI is specified or has a default value on this element, false otherwise.
这对您有帮助吗?