Javascript examples for jQuery:Tag Traversing
Use jQuery to find element by value
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.2.js"></script> <script type="text/javascript"> $(window).load(function(){//from www. j a va 2s .co m var some_variable = $("a:[title='Use ctrl + >']").attr("href") console.log(some_variable) }); </script> </head> <body> <a href="http://site.com/someid/" title="Use ctrl + >">next</a> </body> </html>