简体   繁体   中英

How To Open link when mouse hover

当鼠标悬停在“单击此处”上方时,如何使该链接<a href="www.site.com">Click here</a>打开链接?

HTML one line solution:

<a href="http://www.google.com" onmouseover="click();">Click here</a>

We are using inline events with Javascript, triggering the click event to the current link element, when mouse hovering.

To learn more: http://www.w3schools.com/jsref/event_onmouseover.asp

You can give that element a name like name='blah'. Then access it using javascript andtake advantage of the javascript MouseOver event. For more information on that just google it, it's everywhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM