$.ajax({
type:’post’,
url:url,
data:{user_id:user_id},
async:false,
dataType:’json’,
success:function(result){
document.cookie = "id="+escape(result.data.user_id)+"; path=/";
document.cookie ="user_account="+escape(result.data.user_account)+"; path=/";
document.cookie = "key="+escape(result.data.key)+"; path=/";
}
});