Hi guys
This is my first time learning ajax using jquery.
My get-html.htm:
Code:<!DOCTYPE html> <html> <head> <style> div { font-size:14px; } </style> <script src="http://code.jquery.com/jquery-1.5.js"></script> </head> <body> <div id="myDiv"></div> <script> $.ajax({ url: "test.html", type: "GET", dataType: "html", success: function(html) { $('#myDiv").html(html); } }); </script> </body> </html>
And my test.html;
Code:<html> <head> </head> <body> <p>This is from external file, test.html</p> </body> </html>
By the way I run this and it did not show anything.
I know this is really very basic, What is the problem with this?
But please consider because I'm really new to jquery/ajax
Thanks in advanced.



Reply With Quote


Bookmarks