• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • DOMElement::hasAttributeNS()

    (PHP 5, PHP 7)

    Checks to see if attribute exists

    说明

    publicDOMElement::hasAttributeNS(string $namespaceURI,string $localName): bool

    Indicates whether attribute in namespace$namespaceURInamed$localNameexists as a member of the element.

    参数

    $namespaceURI

    The namespace URI.

    $localName

    The local name.

    返回值

    成功时返回TRUE,或者在失败时返回FALSE

    参见

    • DOMElement::hasAttribute() Checks to see if attribute exists
    • DOMElement::getAttributeNS() Returns value of attribute
    • DOMElement::setAttributeNS() Adds new attribute
    • DOMElement::removeAttributeNS() Removes attribute