Guest User

Test for CORS

a guest
Aug 17th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.84 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  5.     </head>
  6.  
  7.     <body>  
  8.         <h1>Click the below button to see the AJAX response</h1>
  9.         <input type="submit" value="click here" id="button1" />
  10.  
  11.         <div id="placeHolder">
  12.  
  13.         </div>
  14.  
  15.  
  16.         <script type="text/javascript">
  17.             var jq = jQuery.noConflict();
  18.  
  19.             jq(document).ready(function(){
  20.                 jq("#button1").click(function(){
  21.                     alert("Hello");
  22.                     jq.get("http://www.google.com", function(data, status){
  23.                         alert(data + "" + status);
  24.                         jq("#placeHolder").html(response);
  25.                     });
  26.                 });
  27.             });
  28.         </script>
  29.     </body>
  30. </html>
Add Comment
Please, Sign In to add comment