Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
- </head>
- <body>
- <h1>Click the below button to see the AJAX response</h1>
- <input type="submit" value="click here" id="button1" />
- <div id="placeHolder">
- </div>
- <script type="text/javascript">
- var jq = jQuery.noConflict();
- jq(document).ready(function(){
- jq("#button1").click(function(){
- alert("Hello");
- jq.get("http://www.google.com", function(data, status){
- alert(data + "" + status);
- jq("#placeHolder").html(response);
- });
- });
- });
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment