Get a html and output after loading - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:html

Description

Get a html and output after loading

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
      <script type="text/javascript" charset="utf-8">
     $(document).ready(function() {
       $.get('_test.html', function(html) {
           $('p:first').after(html);
       });/*w w w . j  av a2 s .c o m*/
     });
    
      </script> 
   </head> 
   <body> 
      <p>This is content at the top of the page.</p> 
      <p>This is content at the bottom of the page.</p>  
   </body>
</html>

Related Tutorials