New in Javascript, really need help!
Now I have an image on an HTML page, for example:
<a class="p" href="http://www.abc.com"><img src="http://www.abc.com/logo.jpg" alt="" /></a>
And get the picture element:
var e.document.elementFromPoint(x,y);
When I clicked on the image, I can get the src attribute or offset attributes successfully:
e.src or e.offsetHeight
However, it returns NULL when I use:
return e.href;
So how can I get the correct href attribute (http://www.abc.com) ??
Thank,
Peak
source
share