我想通过 AJAX 设置 cookie。但我收到警告“无法修改标题”有什么想法吗?
<?php
if($_POST['name']){
setcookie("autosave_blogo_id", "value", time()+10800, '/');
}
?>
$("#button").click(function(){
$.ajax({
var indata = $('#b_pav').val();
type: "POST",
url: "<?php echo "http://" . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>",
data: indata,
success: function(msg){
alert(msg);
}
});
return false;
});