jquery append external html file into my page - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:append

Description

jquery append external html file into my page

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <script src="https://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></script> 
  <script type="text/javascript">
            $(function () {/*from w  w  w.  ja  va  2  s  . c  om*/
                $.get("banner.html", function (data) {
                    $("#appendToThis").append(data);
                });
            });
        
      </script> 
 </head> 
 <body> 
  <div id="appendToThis"></div>  
 </body>
</html>

Related Tutorials