The nohref attribute on an area tag causes the are to be specifically excluded from an image map. It works in IE 6-7 in that you can see the mouse pointer is not changed when hovering over an area marked as such. The rectangle has a “nohref” and the blue circle doesn’t.
However, I can’t figure out any way to programatically test for it in Javascript that works in IE 6 & 7. getAttribute always returns false whether the attribute is present or not. jQuery .attr doesn’t work either.
By the XHTML standard, nohref attributes should be written as
nohref="nohref". If you do that, you can easily test for it as.attr('nohref')will return the string"nohref".However this attribute is no longer supported in HTML5. From the W3C working draft:
Therefore you can test for it by
if($('area').attr('href')){ /* href is set */ }.