$('#message').css({ "transform":"scale(0)", "transition":".5s" }); }) function login() { $.ajax({ type: "POST", dataType: "json", url: "http://www.gdelx.com/beipiao_myform/", data: $('#myform1').serialize(), success: function (result) { console.log(result); if (result.status == "success") { $('#myform1')[0].reset(); $('#message').css({ "transform":"scale(0)", "transition":".5s" }); alert("提亀成功"); }else { alert(result.msg); } }, error : function() { alert(result.msg); } }); }