I want my anchor element link not be selected more than once, but unfortunately I can't. Please tell me if any ways to do so.
My tags are like this. ">Link ">Link
What I want here is that the link redirects to FirstThing.php and after doing something it come to the original form, but I need only SecondThing.php do something SecondThing.php and hide or not do any thing...please guys I need a quick solution.
答案 0 :(得分:0)
答案 1 :(得分:0)
以下代码将拦截初次点击后锚链接的未来点击,并阻止链接被跟踪。
<a href="#" onclick="this.onclick = function() { return false; };">link</a>
答案 2 :(得分:0)
您可以在点击事件后立即从链接中删除href。
<a href="#SomeAction" onclick="setTimeout(function() { this.removeAttribute('href'); }.bind(this), 0);">My Link</a>