Follow nth anchor|href via javascript -
i'm trying embed pdf page maintain. problem: source filename changes every week , can not guessed (randomnumber.pdf). that's dead end.
my next approach link on main source site. looks following:
http://www.example.com/index.php?menuid=44&downloadid=190&reporeid=65
unfortunately "downloadid" not strictly ongoing.
but sourcecode of website reveales href need 20th href on site.
is there way open 20th href via javascript?
i wasn't able find useful or figure out myself - trying help!
here comment in answer form:
i array of elements , take 19th out of it. when having use .click() on use it.
var links = document.getelementsbytagname("a"); links[19].click();
<a href ="www.google.com">1</a> <a href ="www.google.com">2</a> <a href ="www.google.com">3</a> <a href ="www.google.com">4</a> <a href ="www.google.com">5</a> <a href ="www.google.com">6</a> <a href ="www.google.com">7</a> <a href ="www.google.com">8</a> <a href ="www.google.com">9</a> <a href ="www.google.com">10</a> <a href ="www.google.com">11</a> <a href ="www.google.com">12</a> <a href ="www.google.com">13</a> <a href ="www.google.com">14</a> <a href ="www.google.com">15</a> <a href ="www.google.com">16</a> <a href ="www.google.com">17</a> <a href ="www.google.com">18</a> <a href ="www.google.com">19</a> <a href ="http://www.w3schools.com/cssref/css3_pr_background-size.asp">20</a> <a href ="www.google.com">21</a> <a href ="www.google.com">22</a> <a href ="www.google.com">23</a> <a href ="www.google.com">24</a> <a href ="www.google.com">25</a> <a href ="www.google.com">26</a>
have fun :)
Comments
Post a Comment