How to get the url from a frame?
I have this jsp page that includes the following frames:
<frameset cols="20%,*">
<frame src=”SideBar.jsp” name="frameA">
<frame src=”http://www.w3schools.com/” name="frameB" target="_self">
</frameset>
In frameB,it's an external link, the user can navigate that webpage and click on links and do stuff. Is there a way when the user clicks on a link, to get the url of that new webpage? e.g. h开发者_高级运维ttp://www.w3schools.com/html/default.asp
Thanks in advance
Did you try:
alert(frameB.location);
Depending on the browser, this may be disabled due to security reasons.
(You don't know when the user clicked a page, so you should check in regular intervals if it changed.)
精彩评论