如何在锚标签中找到锚链接并使用jquery自动单击该链接
How to find anchor link within anchor tag and click on that link automatically using jquery
如何在锚标签中查找锚链接并在jquery中自动单击该链接。
例
<div id="myid">
<a id="interestingness" href="htttp://mylink.com">mytestinglink</a>
</div>
你可以尝试这样的事情:
$('#interestingness')[0].click();
<div id="myid">
<a id="interestingness" href="htttp://mylink.com" target="_blank">mytestinglink</a>
</div>
$("#interestingness").click(function(){
var currentAnchor = $(this);
alert(currentAnchor.text());
alert(currentAnchor.attr('href'));
});
$('#interestingness').click();
相关文章:
- 如何使用jQuery自动打开页面上的所有链接
- 如何在不链接/jquery的情况下使用方法应用css属性数组
- 干净地链接 jQuery ajax 请求
- 在coffeescript中链接jquery方法和参数
- 如何正确链接JQuery并使用.getJSON
- 链接jQuery中的两个元素
- 滚动到活动链接 jQuery
- 如果链接少于 1 个,则计数和隐藏链接.Jquery.
- 获取链接 href 并将其应用于另一个链接 jQuery
- jQuery-检查复选框值(链接jQuery函数与If Statment)
- 在具有固定链尾调用的循环中链接jquery.when().then()
- 更改链接jquery的href
- 使word in变成一个链接jQuery
- 如何在飞行中用文本创建链接?——JQuery初学者
- 检测文本中的超链接- jQuery
- 我如何从现有的第三方控件链接jQuery事件
- 链接JQuery命令
- 如何在点击链接Jquery/JS时将动态内容添加到引导模式中
- 切换单击链接jquery时不关闭
- 如何知道点击了哪个链接[jQuery]