var links = document.getElementsByTagName('a');
for(var i = 0; i < links.length; i++){
  if(links[i].innerText == "View Amazon Product Page"){
    links[i].click();
  }
}

在 2013年4月18日星期四UTC+8上午4时23分37秒,[email protected]写道:
>
> *<p><a href="http://www.amazon.co.uk/gp/product/B006X03YT0";>View Amazon 
> Product Page</a></p>*
>
> *
> *
>
> *
> *
>
>
>
> Obviously the destination URL will vary, but the text will always say "View 
> Amazon Product Page"
>
>
> So, can I do this in Javascript, please? 
>
>
> Racking my brain and doing JavaScript tutorials to try and get my head around 
> this. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to