我想将我的字段值与使用ajax的mysql字段进行比较。
这是我的ajax鳕鱼:
class TestCard
{
public static void main (String args[]){
Card card = new Card(8, 4);
{
System.out.println(card);
}
}
}
这是我在check.php中的代码
$("#checkCodeButton").click(function() {
var enteredCodeField = $("#order-discount").val();
$.ajax({
type: 'post',
url: 'check.php',
data: {
enteredCode: enteredCodeField
},
dataType: "text",
success: function(data) {
alert(data);
}
})
});
但是我不知道为什么当我单击按钮时它不起作用? (我也在wordpress中运行它们并在脚本中链接了jquery> 谢谢
答案 0 :(得分:0)
您是否检查了网络部分中的开发人员工具告诉了您什么? 您肯定会发现一个错误,如果您告诉我们,我们可以为您找到解决方案:)