<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> $(document).ready(function(){ //this code is working smooth $("button").click(function(){ $.get("demo_test.asp", function(data, status){ alert("Data: " + data + "\nStatus: " + status); }); }); }); </script> </head> <body> <button>Send an HTTP GET request to a page and get the result back</button> </body> </html>
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script> //this code is not working $(document).ready(function(){ $("button").click(function(){ $.get("http://www.xxx.com/yy/an/2016Mar24", function(data, status){ alert("Data: " + data.text() + "\nStatus: " + status); }); }); }); </script> </head> <body> <button>Send an HTTP GET request to a page and get the result back</button> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)