我需要将一个参数传递给jquery post,然后使用$\u post方法获取它。
</head>
<body>
<?php
$name = isset($_POST["name"]) ? "ok" : "error";
echo $name;
?>
<button type="button" id="getIt">Tıkla</button>
</body>
</html>
<script>
$(document).ready(function(){
$('#getIt').click(function () {
$.post( "xx.php", {"name": "xxx"})
});
})
</script>