Thanks very much! (This was caught in my spam folder - only just found it!)
________________________________ From: Jian Zhang <[email protected]> To: [email protected] Sent: Thursday, May 9, 2013 2:24 AM Subject: [greasemonkey-users] Re: How can I automatically click a link if it appears on a given page? 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 a topic in the Google Groups "greasemonkey-users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/greasemonkey-users/I_WHgM-t-iQ/unsubscribe?hl=en. To unsubscribe from this group and all its topics, 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. -- 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.
