jquery代码:
$("a").click(function(){
var id = $(this).attr('id');
if($.cookie('targetID') === null){
$.cookie('targetID',this.id);
location.reload();
}else{
$.removeCookie('targetID');
$.cookie('targetID',this.id);
location.reload();
}
});
php代码:
$targetID = $this->input->cookie('targetID');