function confirm_reg(id){
if(confirm("Are you sure want to complete")){
$('#'+id).hide(500);
$.post(
'sample.php',
{id6:id},
function(data){
alert(data);
}
);
}
}
sample.php
echo "something";
firebug控制台中没有显示任何错误。甚至隐藏功能都有效。但发布不起作用!
答案 0 :(得分:0)
尝试以下方法:
$.ajax({
type: "POST",
url: url,
data: data, //Data to be sent to server.
success: function(data) {
},
dataType: dataType //Type of data you are expecting from server such as xml, json, html, etc
});