【发布时间】:2021-08-17 05:15:51
【问题描述】:
我想创建一个鼠标悬停函数来访问 href 和 src 链接。然而我得到的只是错误,“ERR_FILE_NOT_FOUND”你的文件无法访问。它可能已被移动、编辑或删除。”。
HTML 代码:
<p><a href=https://readcomiconline.li/Comic/Punisher-Soviet/Issue-2?id=164726#18>OhGod.</p>
<p><a href=http://www.nononsenseselfdefense.com/shop/index.php?l=product_detail&p=45>Oh man</a></p>`
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
jquery 代码:
$("a").mouseover(function(){
location.assign($("a"));
});
});
如何通过鼠标悬停访问 href 和 src 链接,就像我点击了它们一样?谢谢。
【问题讨论】:
标签: html jquery href mouseover onmouseover