First ajax sample, I need advice.
Hi guys
This is my first ajax test sample.
Okay here is the codes of sample1.htm
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- div { font-size:14px; }
- </style>
- <script src="http://code.jquery.com/jquery-1.5.js"></script>
- </head>
- <body>
- <div ></div>
-
- <script>
- $.ajax({
- type: "GET",
- url: "test.js",
- dataType: "script"
- });
-
- </script>
- </body>
- </html>
Below is the codes for test.js
- document.write("This is from external file, test.js")
I tried to run this but it did not show anything, the page is all white.
By the way I got the JQuery codes from this link,
Unfortunately the sample on the page is not 100% complete.
I just created the test.js on my own.
anyone would like to give advice.
Sorry this is my first time.
Thank you in advanced.