<script>
$(function(){
$('.logout').click(function(){
$.ajax({
url:"{:U('Login/logout')}",
data:'',
datatype:'json',
type:'post',
success:function(res){
if(res.status == 1){
alert(res.msg);
location = location;
}else{
alert(res.msg);
location = location;
}
}
})
})
})
</script>