CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 1: | Line 1: | ||
<html> | <html> | ||
− | <head>< | + | <head> |
+ | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | ||
+ | <script> | ||
+ | $(document).ready(function(){ | ||
+ | $("button").click(function(){ | ||
+ | $.ajax({url: "Project", success: function(result){ | ||
+ | $("#div1").html(result); | ||
+ | }, async: true, dataType: 'text/html'}); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
+ | </head> | ||
<body> | <body> | ||
+ | |||
+ | <div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div> | ||
+ | |||
+ | <button>Get External Content</button> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 16:58, 29 August 2017