jQuery 简单的ajax post使用代码
<script type="text/javascript"> $(document).ready(function(){ $("form#formId").submit(function() { inputField = $('#inputFieldId').attr('value'); $.ajax({ type: "POST", url: "yourpage.php", cache: false, data: "inputField ="+ inputField, success: function(html){ $("#ajax-results").html(html); } }); return false; }); }); </script>