jQuery: How do I POST on CLICK?
问题 I'm trying to figure out how I can pass data from page-list.php to page.php using jQuery .post() and .click(). Code in <head> of page-list.php: <script type="text/javascript"> $(document).ready(function(){ $('button.link').click(function () { $.post("page.php", {pageID: "1"} ); } }); </script> Code in <body> of page-list.php: <button class="btn link">LINK</button> When I click LINK, nothing happens. I'm also not sure how to call the posted data on page.php. Should I create a variable in PHP