S
S
skyfly20102015-10-28 10:46:35
JavaScript
skyfly2010, 2015-10-28 10:46:35

How to remember the address of a javascript link when hovering over a block?

Good afternoon. How to do such a thing - it is necessary that when hovering over a link, javascript gets its href value into a variable. The link is in a div.
For example:

<div class"DSA">
<a href="http://yyyyyy.com/12321312sadsda" class="name"> 123123</a>
</div>

Moreover, it is desirable to get the link address not from the site directly, but from the browser tooltip. (Circled in green in the figure). The meaning of this action is that the link can be inside the iframe. That is, simply processing with the help of javascript the link page code
<a href="http://yyyyyy.com/12321312sadsda" class="name"> 123123</a>

will not be found.
Roughly speaking, it is necessary that when hovering over a link, a javascript alert shouts the address of the link.
3Ua1FKqRBUcx5lUGR15uhWck-3fIqv5IQ9YX0bhE

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Gromov, 2015-10-28
@skyfly2010

An example of how to work with frame elements. If the frame is loaded by src, then access to its window will be only if the protocol, port and domain match the main window. This is due to the browser's security policy.
You can't access the browser hover tooltip. In fact, it is also formed from href, albeit regardless of its presence in the frame.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question