Javascript examples for jQuery Method and Property:post
Change the text of a <div> element using an AJAX POST request
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("input").keyup(function(){ var txt = $("input").val(); $.post("demo.asp", {suggest: txt}, function(result){ $("span").html(result); });/*ww w .ja v a 2 s . com*/ }); }); </script> </head> <body> First name:<input type="text"> <p>Suggestions: <span></span></p> </body> </html>