Including separate html file does not load - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:html

Description

Including separate html file does not load

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.js"></script> 
      <script type="text/javascript">
$(function(){/*from   www. j  a  va 2s .  c o  m*/
    $.ajax({
      method: "GET",
      url: "b.html",
      dataType: 'html',
      data: { },
      success: function(data) {
          $("#topbar").html(data);
      }
    })
});

      </script> 
   </head> 
   <body> 
      <div id="topbar"></div>  
   </body>
</html>

Related Tutorials