Laravel ajax post提交模板
$.post('/user/email',{'_token':'{{csrf_token()}}','email':$("#email").val()},function(data)
//第二个参数要传token的值 再传参数要用逗号隔开
{
if(data == 2)
{
$("#pass1").css("display","block");
$("input[name='email']").on('focus',function(){
$("#pass1").css("display","none");
});
}else if(data == 1){
$("#pass2").css("display","block");
$("input[name='email']").on('focus',function(){
$("#pass2").css("display","none");
});
}
});