Javascript examples for jQuery Method and Property:ajax
use ajax request to controller method
<html> <head></head> <body> <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script> <script> function reloadSmall() {/*from w w w. j a v a 2 s .c o m*/ $.get("your api url", function(response) { $("#smallContent").html(response); }); } </script> <div id="smallContent" style="background: green"></div> <button onclick="reloadSmall()">Click me</button> </body> </html>