This question may seen before. But in my scenario I didn't get the success. I have local HTML file loading in Iframe with sample external Link.
<a href="http://www.boutell.com/">sample.com</a>
Code:
<iframe id="iframe_Id" src="sample.html"
style="background-color:white; height:100%; width:100%;" onload="Load()"; ></iframe>
function Load() {
alert("loaded");
var linkchange = document.getElementById("iframe_Id").contentWindow.location;
alert(linkchange);
}
While click on the external link I need the url value of particular anchor tag.
Edit: I know because of security policy we can't get URL when it is different domain. But I need the value from my local HTML page(the Link URL What I Clicked ). I didn't tried in this case
Any help is needed regarding this.