संदर्भ hasAttribute()

hasAttribute()

Returns true if the element has a given attribute and false if not.

The parameter, name, is a string with the name of the attribute being checked.

Note: Use myXML.getString() or myXML.getNum() to return an attribute's value.

उदाहरण

सिंटैक्स

hasAttribute(name)

पैरामीटर्स

name
String: name of the attribute to be checked.

Returns

boolean: whether the element has the attribute.

संबंधित संदर्भ