Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 mousedown 事件创建一个热图,但在此之前我需要捕获网站上的 A 元素。有谁知道我怎么能做到这一点?
简而言之:如果我单击一个链接,它应该执行以下操作:
$('a').click(function(){ $.ajax({ url: '/analytics', type: 'post', data: {url: $(this).attr('href')}, async: false }); }