How can i implement a code for auto-clicking
如何实现自动点击代码
<a href="#" class="link">test</a>
type links?
键入链接?
$('a.link').click();
doesn't work
不起作用
2 个解决方案
#1
1
Now i figured out. This is working:
现在我想通了。这是有效的:
$('a.l_like').each(function(index) {
$(this).click();
});
#2
0
$('a.link').click(function(){
// you jquery ajax code
});
you can then go like
然后你可以去
$('someotherelement').click(function(){
$('a.link').trigger('click');
});
#1
1
Now i figured out. This is working:
现在我想通了。这是有效的:
$('a.l_like').each(function(index) {
$(this).click();
});
#2
0
$('a.link').click(function(){
// you jquery ajax code
});
you can then go like
然后你可以去
$('someotherelement').click(function(){
$('a.link').trigger('click');
});