gpt4 book ai didi

jquery - anchor ( 标签)上的 event.target 错误/bug?

转载 作者:行者123 更新时间:2023-12-01 07:01:31 25 4
gpt4 key购买 nike

最佳答案

一切都好!它只是任何链接的表示。您仍然可以使用 event.target.href 甚至 event.target.id 等等。

Some elements, such as HTMLAnchorElement, have special toString functions that prevent you from finding their class name easily. If you type javascript:alert(document.links[0]) in the location bar, you will see the URL of the first link instead of its class name. The way to get around this problem is to use the default toString function on the object document.links[0], like so: javascript:alert(window.toString.apply(document.links[0])).

来自here .

关于jquery - anchor ( <a> 标签)上的 event.target 错误/bug?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3413027/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com