Append text into detached html - Javascript jQuery

Javascript examples for jQuery:Text

Description

Append text into detached html

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">
    $(window).load(function(){/*from  ww w. j  a  va  2 s  .co  m*/
$( document ).ready(function() {
   text = '<p>One</p><p>Two</p><p>Three</p>';
   console.log($(text).filter('p').length);
});
    });

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

Related Tutorials