admin管理员组文章数量:1205174
I have anchor links which has click event attach to them. When I use tab key to reach the anchor link and press enter, it trigger the click event. I want that it goes to the link attached and does not trigger the click event when pressed enter.
public clickHandler(e: Event) {
if (this.isMobile) {
e.preventDefault();
}
this.changeState(this.singleItem);
}
}
本文标签: javascriptPrevent quotEnterquot to trigger onClick event of anchor tagStack Overflow
版权声明:本文标题:javascript - Prevent "Enter" to trigger onClick event of anchor tag - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738676411a2106288.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论