Placing a Click event on an achor tag in html from javascript? -
Is there any problem in placing an onclick event to an anchor tag that anyone can help, it seems, it works on an image .. I is
this.whereAreWe = document.getElementById ( 'where_are_we'); this. Where ours Click on = this. Where Ours; I have a tag using the ID "where_are_we" ...
But it is never executed .. If I change it to an image I am working it.
Am I certain about anchor tag and have implemented onclick via code?
I've also tried to remove it Href, if I remove the href am so it does not show me the little hand icon.
I have put a breakpoint in the function and in the image it enters, but it does not do it using anchor
Any thoughts?
I also tried to remove the href, if I href do not show it to me a small hand icon is.
You need the 'href' attribute for the 'A' tag to specify the destination document or URL of the web resource. If you do not specify it - the mouseover cursor does not change. Of course you can use CSS to modify it but this is a different question.
Comments
Post a Comment