Ajax loading text file - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:ajax

Description

Ajax loading text file

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Stackoverflow is Awesome</title> 
      <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js">

      </script> 
   </head> 
   <body> 
      <div class="menu"> 
         <div id="here"></div> 
      </div> 
      <script type="text/javascript">
  $(function(){//  www.  ja  va2 s.co m
    $('div#here').load('mytext.txt');
  });

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

Related Tutorials