Use jQuery to find element by value - Javascript jQuery

Javascript examples for jQuery:Tag Traversing

Description

Use jQuery to find element by value

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials