$.ajax({
url: 'test.php',
type: "POST",
data: registerForm.serialize(), region: $("#regio option:selected").text(),
success: function(data) {
console.log(data)
}
});
现在我用这个我得到registerForm.serialize()
的所有数据,我可以叫他们test.php的与$_POST['the_name'];
传递值从Ajax调用PHP
现在我需要传递给test.php的$("#regio option:selected").text()
每当我在test.php中做echo $_POST['region']
它没有看到区域属性,我在里面发送ajax到test.php。
如何将$("#regio option:selected").text()
传递给test.php并在test.php中调用它。