grab some data from returned html in jquery by parsing XML - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:text

Description

grab some data from returned html in jquery by parsing XML

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.6.1.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){/*from  ww w .jav  a2  s  .  c  o  m*/
var data = $.parseXML("<h1> Title </h1>");
console.log($(data).find('h1').text());
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials