Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7950981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:25:39+00:00 2026-06-04T02:25:39+00:00

I am trying to loop through all the links on a site and autoclick

  • 0

I am trying to loop through all the links on a site and autoclick some links in order to vote for here is what I have so far:

    function x(){
        for(var e in document.getElementsByTagName("a")){ 
            alert(e.getAttribute("href"))
            e.click;
        }
    }

This currently does not work I think it maybe to do with something simple like the braces/; key, I’m an absolute beginner to javascript so please bear with me.
I assume you get the drift of what I want to do, I have completed this task in another language but still did not get the vote to register, I believe this maybe something to do with the site using jquery? My question is, How can I get this simple script working for a start, and 2) Is there a different click method for Jquery I can use instead of what I have up there 3) How Can I check for 6 specific URLs and click only these. I also need to execute this from the browser using javascript:xxx_code_here

Any ideas?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:25:40+00:00Added an answer on June 4, 2026 at 2:25 am

    use jquery like

    $("a").each(function ()
    {
       $(this).trigger('click');//for clicking element
       var href = $(this).attr("href");
    });
    

    You can use trigger:

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to loop through all of the links on a page and
I'm trying to loop through all files of .properties extension, in a root folder:C:\ExecutionSDKTest_10.2.2\,
I'm trying to use Linq to loop through all fonts in the %windir%\Fonts folder
I'm trying to write a unit test that will loop through all action methods
I'm trying to loop through a list of results from MySQL and display all
I am trying to loop through some controls in a Powershell / WPF application.
I am trying to make a loop that loops through all different integers where
So I'm trying to loop through all the values of tables, which connect by
I'm trying to loop through all the lines of a file and for each
I'm trying to loop through all event subscriptions for an object that : INotifyPropertyChanged

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.