Home
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function () { $('#ajaxBtn').click(function(){ $.get('/jquery/getjsondata', {name:'Steve'}, function (data, textStatus, jqXHR) { $('p').append(data.firstName); }); }); }); </script> </head> <body> <h1> jQuery get() method demo </h1> <input type="button" id="ajaxBtn" value="Send GET request" /> <p> </p> </body> </html>
Result: