Older versions of IE don't support hasAttribute, and as Šime Vidas discovered even jQuery can't be trusted on those browsers.
The way I had to do it when I needed something similar in an older version of IE was:
function hasAttribute(el, attr) {
if ("hasAttribute" in el)
return el.hasAttribute(attr);
else if ("outerHTML" in el) {
return (el.outerHTML
// remove content
.replace(el.innerHTML, "")
// remove attribute values with quotes
.replace(/=(?:(["'])[^\1]*\1)?/, " ")
// remove attribute values without quotes
.replace(/=[^\s>]+/, "")
// normalize
.toLowerCase()
// search for attribute
.indexOf(" " + attr.toLowerCase()) > -1);
}
}
In your case, you might use this function like so:
var hasValue = hasAttribute($("a")[0], "value");
Unfortunately, this still isn't very robust in Internet Explorer 8 and lower. False positives and negatives will be returned in those browsers for various attributes and, unfortunately, I don't believe there's a workaround.