Home Cooker Classes Others Rice CookerGX
Classes  >  element  >  HasAttribute(string)
element class : HasAttribute(string) method

Description

Gets a value that indicates whether the specified attribute is exist.

Syntax

elementInstance.HasAttribute(string attributeName)

Arguments

ClassNameDescription
stringattributeNameAn attribute name.

Return value

ClassDescription
boolA value that indicates whether the specified attribute is exist.

Sample code

//anyElement is any instance of element type.

string attributeName = "class"

bool exist = anyElement.HasAttribute(attributeName);

Notes

It's a wrapper of the MSHTML.IHTMLElement5.hasAttribute(String).

Links for reference

Copyright © Rice All rights reserved.