如何使用asp.net单击页面上存在的所有链接 [英] How to Click all links exists on a page using asp.net

查看:103
本文介绍了如何使用asp.net单击页面上存在的所有链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个Web应用程序,我想自动点击网页中的所有链接。在页面中,假设存在25个链接。所以需要打开所有25个链接。



因为我无法单击所有链接!请分享您的想法和处理意见。



任何帮助都会被评估..

I wanted to create a web aplication where i want to click all links in a webpage automatically. Like in a page assume 25 links exists. So need to open all 25 links.

As I am unable to click all the links in a single shot!! kindly share your idea and views on processing.

Any help will be appriciated..

推荐答案

嗯在那种情况下尝试这个JavScript代码在某些情况下你有内部交易我们必须绑定的事件

Well In That Case Try This JavScript Code In Some Case In Which You Have Fired Event With inside Transaction We Have To Bind
function allLinks()
{
  var anchors=document.getElementsByTagName("a");
  for(var i =0;i<anchors.length;i++)>
  {
     window.open(anchors[i].href,"_blank");
  }
}





我没有尝试过它第一次面对这样的问题但我觉得它应该工作,这里锚点是页面和窗口上所有超链接的数组.open()函数用于打开一个窗口。你可以调用这个功能在你的网页结尾处



如果你不了解javascript那么我建议你学习它



祝你好运



Well I did`t Try It Its First Time For Me To Facing Problem Like This But I think It Should Work, Here anchors is array of all hyperlinks on Page and window .open() function is used for open a window. and you can call this function At the end of your web page inside the

If you don`t know about javascript then i suggest you to learn It

Good luck


这是一个自动点击网页中所有链接的网页应用程序:www.visuallinkchecker.com



我希望这会有所帮助。
Here is a web application that clicks all links in a web page automatically: www.visuallinkchecker.com

I hope this helps.


这篇关于如何使用asp.net单击页面上存在的所有链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆