不知道我错过了什么,价值不会发布。我希望将代码发布到当前页面(test.php)
<script>
$(document).ready(function(){
$("#submit_response").click(function() {
$.post(test.php, {name: 'demo'}, success: function(data) {
});
});
});
</script>
<a href="#" id="submit_response" data-role="button" data-theme="a">Demo Save</a>
<?php if(isset($_POST['name'])) echo 'Posted: '.$_POST['name'];?>