Get the title of select tag using Jquery - Javascript jQuery

Javascript examples for jQuery:Selector

Description

Get the title of select tag using Jquery

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.10.1.js"></script> 
  <script type="text/javascript">
    $(function(){/* ww  w .  j  a  v a2s .  co  m*/
var x = $('select').attr("title");
    console.log(x);
});

      </script> 
 </head> 
 <body> 
  <select id="selectStatus" class="floatleft" name="field3" title="Select status"> <option>test</option> </select>  
 </body>
</html>

Related Tutorials