Get meta tag content in jQuery - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:jQuery Method Example

Description

Get meta tag content in jQuery

Demo Code

ResultView the demo in separate window


<html>
   <head> 
      <meta name="my" content="aaa"> 
      <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> 
   </head> 
   <body> 
      <script>
     $(function() {//from   ww w .  java 2s .  c o  m
        console.log('ready');
        console.log($('head').find('meta[name="my"]').attr('content'));
     });
   
      </script>  
   </body>
</html>

Related Tutorials