Click here to Skip to main content
15,911,531 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is the source code :
HTML
<!DOCTYPE html>
<html>
    <head>
        <title>My Awesome Website</title>
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
         <script>
         $(document).ready(function(){

               $('#container').load('t.html');

           });

        </script>
    </head>
    <body>

        <noscript>
            <h1>Please enable Javascript!</h1>
        </noscript>

        <div id="container">

        </div>

    </body>
</html>



load file : t.html
HTML
<h1>Hello </h1>

plz help ,it can not work,it does not work in google crome browser ,
Version 35.0.1870.2
Posted
Updated 6-Mar-14 22:28pm
v3
Comments
Sarrrva 7-Mar-14 5:04am    
both files are .html file huh?

1 solution

Your code is fine, The load() method loads data from a server and puts the returned data into the selected element.
You have to put both files on a web server and access the main one through the browser.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900