has_attr function

Does an element's attribute match a value?