Load a html file - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:html

Description

Load a html file

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> 
      <script>
   $(function(){// w ww  .  j a  va 2  s .c  o  m
    $("#headerDiv").load("header.html");
   });

      </script> 
   </head> 
   <body> 
      <div id="headerDiv"></div> 
      <!-- Rest of the code -->  
   </body>
</html>

Related Tutorials